-
Notifications
You must be signed in to change notification settings - Fork 152
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
Feature: helper functions to handle missing observations #79
Comments
Hi, If it would be able to take pd.DataFrame we could use the advantage of having an index. With index we could:
this month i dont have time to work on this issue, just wanted to share my ideas |
Thanks for your ideas. I think it is a very good idea to have a helper function in |
I've used another way to handle this in the cmf 1d example. This approach needs numpy arrays but not pandas, which is a pain to keep as a dependency. |
I faced this issue while calibrating a groundwater model (MODFLOW) that may or may not converge depending on the parameters that are sampled by Spotpy. Whenever the model does not converge for a specific parameter set, I've added a simple if statement (if simulation == NaN) that returns "9999" or anything produces a ridiculously low likelihood. This has solved the NaN issue for me and I assume it has the added benefit of telling the sampler to steer away from regions in the parameter space where the model does not converge. Pandas support would certainly make these issues easier to deal with and provide flexibility with plotting and managing the massive output files :) |
+1 for automated censoring of nans. |
* master: (22 commits) Added missing lines to allow for starting dream proposal vectors Update Version number upload to pypi Fix bug under mpi use Updates version number corresponds to upload on pypi Removed test for <Python3.6 due to deprectaed numpy version remove parameter interaction test for python 2 Adopt test scripts to changes in examples Removed - sign from Rosenbrock example objectfivefunction Slight changes in sceua sampler and added corresponding tutorial Update _algorithm.py Work with None instead of np.NAN as this was not recognized Update __init__.py Update Version number, uploaded new pypi version Renamed keyword for saving switch Removes unfinished model runs from output file Enable automatic nan filtering for RMSE thouska#79 Added comment Further version compability test Force pytest_cov down to v2.6 Force decrease version of pytest_cov as v2.6.1 is deprecated ... # Conflicts: # .travis.yml
It seems objective functions under
spotpy.objectivefunctions
do not handle missing values (NaN) in observations out of the box. In effect this currently results in algorithms spinning wheels with nonsense fitness values.item (1) is a given, 2 and 3 are for discussion.
I started drafting something in a fork but before investing substantial time on 2 and 3 would like a discussion.
The text was updated successfully, but these errors were encountered: