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

SVC predict_proba not supported #46

Closed
IslamSabdelazez opened this issue Feb 6, 2019 · 8 comments
Closed

SVC predict_proba not supported #46

IslamSabdelazez opened this issue Feb 6, 2019 · 8 comments

Comments

@IslamSabdelazez
Copy link

when i try to export "porter = Porter(model, language='java', method= 'predict_proba')" from SVC model it returns "Currently the chosen model method 'predict_proba' isn't supported." is there any solution to get the probability of the predicted class ?!

@nok
Copy link
Owner

nok commented Mar 5, 2019

Sorry, not today, this feature is work in progress.

@lunar74
Copy link

lunar74 commented May 2, 2019

When will you release this feature? I need this, too.

@KMKnation
Copy link

Any new updates? on this feature.

@nok
Copy link
Owner

nok commented Jul 11, 2019

Hello @KMKnation , yes, the adaption of all listed estimators is still in progress.

@nok
Copy link
Owner

nok commented Aug 10, 2019

The estimator sklearn.svm.SVC doesn't support the computation of the class probabilities. There is no predict_proba mehtod. Because of that there will be no implementation in sklearn-porter.

@nok nok closed this as completed Aug 10, 2019
@D-Chen33
Copy link

Hi Nok,

Thanks for the project.

I think sklearn.svm.SVC is supporting class probabilities, as shown in this link:

https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC.predict_proba

I wonder if you can include it :-)

@ghost
Copy link

ghost commented Feb 26, 2020

This feature is much required please update.

@AmirHosseinCV
Copy link

I needed the same thing for RandomForestClassifier, I changed the last part of code (in my case, js code):

this.predict = function(features) {
        var classes = new Array(3).fill(0);
        for (var i = 0; i < trees.length; i++) {
            classes[trees[i](features)]++;
        }
        return findMax(classes);
}

to:

this.predict = function(features) {
        var classes = new Array(3).fill(0);
        for (var i = 0; i < trees.length; i++) {
            classes[trees[i](features)]++;
        }
        return classes;
}

But I don't know if it works with svm or not.

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

6 participants