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

ml.svm probs error #186

Open
kieranmaraj opened this issue Mar 30, 2023 · 4 comments
Open

ml.svm probs error #186

kieranmaraj opened this issue Mar 30, 2023 · 4 comments
Assignees

Comments

@kieranmaraj
Copy link

Hi there!

I'm trying to use the ml.svm object in Max 8.5.3 on MacOS 10.14.6. In general it works fantastically, but I'm having an issue getting the probabilities to output from the object. I'm reading in a model that I've already trained and then sending the object a probs 1 message. From there, whenever I try to send a 'map' message, I get the console message: 'error: ml.svm: labels / likelihoods size mismatch.' I'm not sure what I'm doing wrong - if I work with the ml.svm in the help patch, I'm able to get probability output there without an issue.

Any help with this is super appreciated!

@NiccoloGranieri
Copy link
Contributor

Hi @kieranmaraj, thanks for using ml.lib.

As the error says, this is due to a mismatch between the size of the label and the likelihoods. Having said this, I was not able to replicate the error on my machine. Could you please create a minimal patch that exhibits the error and send it over?

@kieranmaraj
Copy link
Author

It seems that the error only occurs when reading a trained model into the object. When I train a model and then give it a 'probs 1' message, it works as intended. If I write the model, then read it, sending the 'probs 1' message produces the above error. This seems to be the case with any model, but I've attached the .model and .data files for one of the models I'm working with.

svm-model.zip

@kieranmaraj
Copy link
Author

And a very simple patch to demonstrate:

svm-test.zip

@NiccoloGranieri
Copy link
Contributor

Hi @kieranmaraj , thanks for reporting this. I can confirm that I can reproduce the error with the code and training data you provided, and even with simpler classification tasks with 2 classes alone.

I will mark this issue as a bug, but unfortunately we are not actively working on ml.lib anymore. It might take some time before this fix makes it into a new release.

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

No branches or pull requests

3 participants