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
Typechecks #13
Comments
@JCSyng Sounds great! Yeah, this is definitely still more "lab code". And I was thinking of refactoring that entire section to take in a validation set as well -- since that seems to be the best way to determine how many MERF iterations to run. Also, adding divergence checks. |
Where exactly were you having the issue @JCSyng? I have some time now, and I want to make sure that this code works for both numpy and pandas inputs. |
I have hit (and worked around) this issue. The x, y and z inputs can be ndarrays, but the cluster parameter must be a pandas.Series. If you pass an ndarray, you get the error "AttributeError: 'numpy.ndarray' object has no attribute 'nunique'"; and if you pass a pandas.DataFrame, you get "AttributeError: 'DataFrame' object has no attribute 'value_counts'". |
Thank you for this wonderful package and your efforts!
For future users, would it be possible to add type-checks and more verbose error statements to the fit func of the MERF class when the input type deviates from the expected input type? This led to a bit of reverse engineering to figure out why the underlying linear alg was failing when, for example, inputting a NUMPY array in place of an expected pandas series.
(Also happy to contribute...when I have the time).
Thanks!
The text was updated successfully, but these errors were encountered: