瀏覽代碼

update parameters used for svm_model

Jérôme BUISINE 4 年之前
父節點
當前提交
66ce30540d
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      models.py

+ 2 - 4
models.py

@@ -21,10 +21,8 @@ def my_accuracy_scorer(*args):
 
 def _get_best_model(X_train, y_train):
 
-    #Cs = [0.001, 0.01, 0.1, 1, 10, 100, 1000]
-    Cs = [1, 2, 4, 8, 16, 32]
-    # gammas = [0.001, 0.01, 0.1, 1, 5, 10, 100]
-    gammas = [0.001, 0.1, 1, 10, 100]
+    Cs = [0.001, 0.01, 0.1, 1, 2, 5, 10, 100, 1000]
+    gammas = [0.001, 0.01, 0.1, 1, 2, 5, 10, 100]
     param_grid = {'kernel':['rbf'], 'C': Cs, 'gamma' : gammas}
 
     svc = svm.SVC(probability=True, class_weight='balanced')