Skip to content

Commit

Permalink
examples: restore scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyPlanden committed Sep 5, 2024
1 parent 2dc511e commit a1a94ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/scripts/spm_IRPropMin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# Generate problem, cost function, and optimisation class
problem = pybop.FittingProblem(model, parameters, dataset)
cost = pybop.Minkowski(problem, p=2)
optim = pybop.AdamW(cost, min_iterations=100, max_iterations=100)
optim = pybop.IRPropMin(cost, max_iterations=100)

x, final_cost = optim.run()
print("Estimated parameters:", x)
Expand Down
3 changes: 1 addition & 2 deletions examples/scripts/spm_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)

# Generate data
sigma = 0.002
sigma = 0.001
t_eval = np.arange(0, 900, 3)
values = model.predict(t_eval=t_eval)
corrupt_values = values["Voltage [V]"].data + np.random.normal(0, sigma, len(t_eval))
Expand All @@ -42,7 +42,6 @@
cost,
sigma0=0.05,
verbose=True,
max_unchanged_iterations=30,
max_iterations=125,
)

Expand Down

0 comments on commit a1a94ff

Please sign in to comment.