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

Multilabel prediction #53

Open
DerMajeed opened this issue May 14, 2019 · 3 comments
Open

Multilabel prediction #53

DerMajeed opened this issue May 14, 2019 · 3 comments

Comments

@DerMajeed
Copy link

I am trying to use the Sklearn Porter to transform my multilabel randomforest Classifier into Javascript. But the transformed Classifier doesn't predict multiple label.

Does the Sklearn Porter support multilabel prediction? If yes, could you please provide a small example of the implementation?

@skjerns
Copy link

skjerns commented May 15, 2019

The JS example itself is using multilabel with 3 different labels. So I assume that this should work.

What are the labels you are using? There are known problems when using labels that are non-sequential ints, e.g. labels [0,1,3] instead of [0,1,2] (#37)

@DerMajeed
Copy link
Author

DerMajeed commented May 15, 2019

First of all, thanks for your response! I am using binary labels, so as a prediction I should get a list of true/false for each label.

For example:

[0,1,1,0,0,0,0,1,0]	

This prediction i mapping back to the string labels.

PS: I don't know, if you understood my problem right. I don't want to predict one label out of multiple possible label (like in the iris dataset example you provided). I want to predict multiple labels out of all of possible labels.

@skjerns
Copy link

skjerns commented May 16, 2019

Ah, I mixed up multiclass and multilabel.

I do assume that this is not implemented yet, it also doesn't work when porting to other languages.

You might be able to work-around with splitting each label up into it's own binary classification RFC. However, this will only work satisfactory if the labels are assumed to be independent (which is most likely not the case).

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