Closed jukent closed 4 years ago
@jhamman Since both pull requests are failing the same tests -- are these failures from something outside of my push?
@jukent,
I fixed the root cause for the failing tests in #11. Once it's merged, this PR should pass the tests.
@jukent,
I fixed the root cause for the failing tests in #11. Once it's merged, this PR should pass the tests.
Thank you so much!
I corrected the fit method (there was an error in how I was finding the standard deviation for each day of year across all years). I don't think the failing tests are related to zscore.py.
@jukent - can you update this branch with the latest master? Then we'll take a look at the CI again.
Also, thanks for staying on this. I hope to return to this project after AGU.
n.analogs is set to 200 which is longer than the length of X (100), which means the last 100 distances produced by the kdtree_.query method are infinite, causing the error.
Is there a reason n.analogs is initially set as 200? Should it be set at max to the length of the array?
Good luck at AGU!
I adjusted _predict_one_step within gard.py:
# get analogs
kmax = max(len(self.kdtree_.data), self.n_analogs)
_, inds = self.kdtree_.query(X, k=kmax, **self.query_kwargs)
so that k cannot exceed the length of kdtree_.data.
Now the checks pass, but let me know if you have any concerns about this method.
@jukent - this is looking great. We need some tests with some dummy data before merging but I'm otherwise happy with where things are.
@jukent - I've opened a PR for discussion on your fork: https://github.com/jukent/xsd/pull/2
Still need to add testing capabilities.