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 model comparison plot, deprecation warning Project #181

Merged
merged 12 commits into from
Mar 19, 2020
Merged

Conversation

dbrakenhoff
Copy link
Member

  • Added deprecation warning for pastas.Project

  • Added ml.plots.compare() for comparing models on the same figure. The figure is based on ml.plots.results(). See example below.

  • Added a test for this method to test_plot.py

image

remove temporary testing code
@dbrakenhoff
Copy link
Member Author

The failure is being caused by c82df93 which only affects python 3.5 apparently.

@dbrakenhoff dbrakenhoff added the development Indicates development of new features label Mar 19, 2020
Copy link
Member

@raoulcollenteur raoulcollenteur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought. We could also make this method separate, e.g.,

ps.plots.comparison(ml1, ml2)

I don't have a real preference, you?

pastas/project/project.py Outdated Show resolved Hide resolved
pastas/project/project.py Outdated Show resolved Hide resolved
@dbrakenhoff
Copy link
Member Author

I'd be fine with it being a separate method. I did it this way because this is how the rest of the plot methods are accessed and thought it might be less easy to find if it was a separate method. Then again, I like the call signature better with ps.plots.compare([ml1, ml2, ...]), so I've changed it.

The warn method allows it to be of type DeprecationWarning, but I'll change it to the logger.warning.

Failure in travis is showing the following message:
TypeError: stem() got an unexpected keyword argument 'use_line_collection'
Odd, but let's see if it works now though.

@raoulcollenteur raoulcollenteur merged commit 2cd0e4f into dev Mar 19, 2020
@raoulcollenteur
Copy link
Member

We'll deal with that matplotlib error in the dev-branch. Merging and Closing this PR.

@raoulcollenteur raoulcollenteur deleted the project branch March 19, 2020 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Indicates development of new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants