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

How to pass "probability=True" to a support vector machine classifier? #49

Closed
matalab opened this issue Aug 31, 2016 · 2 comments
Closed

Comments

@matalab
Copy link

matalab commented Aug 31, 2016

I need to pass probability=True to SVC algorithm, because it is used later for ensemble soft voting classifier (VotingClassifier) and therefore probability calculated is required.
I tried with the following, but get the error: "Error: _svm_hp_space() got an unexpected keyword argument 'probability'"

svc1 = HyperoptEstimator(preprocessing = [],
    classifier=svc('my_svc', probability=True),
    algo=hyperopt.tpe.suggest,
    trial_timeout=120.0
    max_evals=100,
    verbose=2)

How to pass this probability=True parameter value to the SVC classifier utilizing hpsklearn?

@bjkomer
Copy link
Member

bjkomer commented Aug 31, 2016

Looks like that parameter was missed. It may not have existed in scikit-learn 0.13 which was the latest version when hpsklearn was created. I'll add it in, should be a quick fix. The syntax you used will be correct.

@matalab
Copy link
Author

matalab commented Sep 1, 2016

Many thanks, bjkomer!

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