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

Add plotters module #135

Merged
merged 13 commits into from
Jun 14, 2018
Merged

Add plotters module #135

merged 13 commits into from
Jun 14, 2018

Conversation

ljvmiranda921
Copy link
Owner

@ljvmiranda921 ljvmiranda921 commented Jun 14, 2018

I messed up in #131
Reference: #130

ljvmiranda921 added 12 commits June 14, 2018 15:45
In this commit, we add a DeprecationWarning for the PlotEnvironment
module. Although useful, I realized that it might be a hassle when the
environment still optimizes the optimizer if we just want to plot it.

What if a swarm iteration takes a long time? Will plotting take the same
amount of time? We want to decouple the optimization part from the
visualization.

It is better to just have the user supply the position and
cost histories and we just have the module do what it knows.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
In this commit, we decided to remove the @Property in storing
the dependency. I found this very redundant and violates Python's
rule of having only one way of doing things. Instead, we just
access the histories from the class/instance attributes

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
In this commit, we updated the tests on the optimizers to reflect
the changes on using @Property. It's much better now because our
tests are parameterized than having multiple asserts.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This coincides with the decision to deprecate the PlotEnvironment.
The whole environments module is now unsupported, and users will
now be required to use the plotters module instead.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Reference: #130

This commit adds a plotters.py module to replace the environments
module. We hope that we can actually decouple the optimization and
visualization part, without having the environment to do another
rollout of your PSO.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Reference: #130

The problem before is that we tend to have many parameters in our
plotting functions. The formatters module changes that. We have
three types of formatters: Designer, Animator, and Mesher. There
are defaults present, but the user can change and pass them to the
ploting functions whenever needed.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Sometimes your swarm can generate a pure 0 or pure 1 vector,
we should account that.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds the plotters module into ReadTheDocs index
and adds a deprecated information on plot_environment.py

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit updates the docstrings in formatters.py
and adds a legend attribute in plotters.py

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
@ljvmiranda921 ljvmiranda921 added enhancement Feature requests documentation Documentation improvements or fixes labels Jun 14, 2018
@ljvmiranda921 ljvmiranda921 changed the title Feature plotters module Add plotters module Jun 14, 2018
@ljvmiranda921 ljvmiranda921 self-assigned this Jun 14, 2018
@ljvmiranda921 ljvmiranda921 force-pushed the feature-plotters-module branch from c1ef2ac to e533ad6 Compare June 14, 2018 07:14
@ljvmiranda921 ljvmiranda921 merged commit adcf626 into development Jun 14, 2018
@ljvmiranda921 ljvmiranda921 deleted the feature-plotters-module branch June 14, 2018 07:19
@ljvmiranda921 ljvmiranda921 added v0.3.0 and removed documentation Documentation improvements or fixes labels Jun 14, 2018
@ljvmiranda921 ljvmiranda921 mentioned this pull request Jul 31, 2018
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant