Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix basic optimization example unknown arguments issues #329

Merged
merged 1 commit into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/examples/basic_optimization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ several variables at once.
optimizer = ps.single.GlobalBestPSO(n_particles=10, dimensions=2, options=options)

# Perform optimization
cost, pos = optimizer.optimize(fx.sphere, print_step=100, iters=1000, verbose=3)
cost, pos = optimizer.optimize(fx.sphere, iters=1000)


.. parsed-literal::
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/inverse_kinematics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Braced with these preparations we can finally start using the algorithm:
bounds=constraints)

# Perform optimization
cost, joint_vars = optimizer.optimize(opt_func, print_step=100, iters=1000, verbose=3)
cost, joint_vars = optimizer.optimize(opt_func, iters=1000)


.. parsed-literal::
Expand Down
9 changes: 1 addition & 8 deletions examples/basic_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,7 @@
"optimizer = ps.single.GlobalBestPSO(n_particles=10, dimensions=2, options=options)\n",
"\n",
"# Perform optimization\n",
"cost, pos = optimizer.optimize(fx.sphere, print_step=100, iters=1000, verbose=3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see that the optimizer was able to find a good minima as shown above. You can control the verbosity of the output using the `verbose` argument, and the number of steps to be printed out using the `print_step` argument."
"cost, pos = optimizer.optimize(fx.sphere, iters=1000)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/inverse_kinematics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
" bounds=constraints)\n",
"\n",
"# Perform optimization\n",
"cost, joint_vars = optimizer.optimize(opt_func, print_step=100, iters=1000, verbose=3)"
"cost, joint_vars = optimizer.optimize(opt_func, iters=1000)"
]
},
{
Expand Down