SHARE
TWEET

Untitled

a guest Jun 18th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # can add in other models here, just add to search_space below
  2.   log_reg = {"classifier": [LogisticRegression()],
  3.                  "classifier__penalty": ['l2','l1'],
  4.                  "classifier__C": np.logspace(0, 4, 10)}
  5.   svm = {"classifier": [SVC()],
  6.                  "classifier__C": [0.01,0.1,1,10,100],
  7.                  "classifier__kernel":['linear','poly','rbf','sigmoid']}
  8.   log_reg_solver = {"classifier": [LogisticRegression()],
  9.                  "classifier__penalty": ['l2'],
  10.                  "classifier__C": np.logspace(0, 4, 10),
  11.                  "classifier__solver":['newton-cg','saga','sag','liblinear']}
  12.   rand_forest = {"classifier": [RandomForestClassifier()],
  13.                  "classifier__n_estimators": [10, 100, 1000],
  14.                  "classifier__max_depth":[5,8,15,25,30,None],
  15.                  "classifier__min_samples_leaf":[1,2,5,10,15,100],
  16.                  "classifier__max_leaf_nodes": [2, 5,10]}
  17.   search_space = [svm, log_reg, log_reg_solver, rand_forest]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top