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

Error in SVM classify #24

Closed
skomatin opened this issue May 16, 2020 · 3 comments
Closed

Error in SVM classify #24

skomatin opened this issue May 16, 2020 · 3 comments

Comments

@skomatin
Copy link

The function classify in the classifier extension of the SVM model by default always throws an error. This is due to a simple logical error in line 128. For type checking, rather than a logical OR, I believe it should be a logical AND.

@KevinCoble
Copy link
Owner

Are you referencing line 127 of SVMExtension.swift? The line that says:
if type != .c_SVM_Classification || type != .ν_SVM_Classification { throw SVMError.invalidModelType }

I believe you are correct that it should be an 'and', so that it is checking it is not the first valid type 'and' not the second valid type before throwing the exception.

I must be always using 'classifyOne' in my testing, rather than 'classify'.

Thanks for pointing it out. I will get it changed shortly.

@skomatin
Copy link
Author

Yep, that is correct!

@KevinCoble
Copy link
Owner

The change has been made.
Thank you for reporting it

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

No branches or pull requests

2 participants