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

Typechecks #13

Closed
JCSyng opened this issue Aug 15, 2018 · 3 comments · Fixed by #40
Closed

Typechecks #13

JCSyng opened this issue Aug 15, 2018 · 3 comments · Fixed by #40

Comments

@JCSyng
Copy link

JCSyng commented Aug 15, 2018

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!

@resdntalien
Copy link
Contributor

@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.

@resdntalien
Copy link
Contributor

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.

@DrewDevereux
Copy link

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'".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants