-
Notifications
You must be signed in to change notification settings - Fork 230
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
Error when impostors list is empty #17
Comments
If the impostors list is empty, the rest of the algorithm doesn't make much sense to run. That being said, the code should handle that case more gracefully. A simple check before calling |
Exactly! If a particular dataset happens to provide no impostors, shouldn't the code just display the appropriate nearest neighbors? |
Hi, |
Sorry for the late response. In the |
@perimosocordiae : Return early with the linear transformation as an identity matrix, i.e. do nothing, right? |
Yep, that makes sense. |
adds code for safe return in case of no impostors for lmnn, fixes #17
Numpy throws an error in np.hstack(impostors) when impostors is empty.
What would be the recommended way to fix this?
The text was updated successfully, but these errors were encountered: