Skip to content

Commit

Permalink
fix - sklearn/classification example has a typo in the property 'kern…
Browse files Browse the repository at this point in the history
…el' when setting model parameterss (microsoft#1630)

* fix - sklearn/classification example has a typo in the property 'kernel' when setting model parameters
  • Loading branch information
ksachdeva authored and liuzhe-lz committed Oct 23, 2019
1 parent a54728f commit 7a20792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/trials/sklearn/classification/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_default_parameters():
'''get default parameters'''
params = {
'C': 1.0,
'keral': 'linear',
'kernel': 'linear',
'degree': 3,
'gamma': 0.01,
'coef0': 0.01
Expand All @@ -52,7 +52,7 @@ def get_model(PARAMS):
'''Get model according to parameters'''
model = SVC()
model.C = PARAMS.get('C')
model.keral = PARAMS.get('keral')
model.kernel = PARAMS.get('kernel')
model.degree = PARAMS.get('degree')
model.gamma = PARAMS.get('gamma')
model.coef0 = PARAMS.get('coef0')
Expand Down
2 changes: 1 addition & 1 deletion examples/trials/sklearn/classification/search_space.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"C": {"_type":"uniform","_value":[0.1, 1]},
"keral": {"_type":"choice","_value":["linear", "rbf", "poly", "sigmoid"]},
"kernel": {"_type":"choice","_value":["linear", "rbf", "poly", "sigmoid"]},
"degree": {"_type":"choice","_value":[1, 2, 3, 4]},
"gamma": {"_type":"uniform","_value":[0.01, 0.1]},
"coef0 ": {"_type":"uniform","_value":[0.01, 0.1]}
Expand Down

0 comments on commit 7a20792

Please sign in to comment.