Skip to content

Instantly share code, notes, and snippets.

@tugloo1
Created February 1, 2018 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tugloo1/136d52121755b9d7b6ca494ac4939b23 to your computer and use it in GitHub Desktop.
Save tugloo1/136d52121755b9d7b6ca494ac4939b23 to your computer and use it in GitHub Desktop.
selk = SelectKBest(k=5)
dtc = DecisionTreeClassifier(max_depth=6, random_state=42, min_samples_split=3)
pipline_steps = [
('best_feature', selk),
('decision_tree', dtc)
]
clf = Pipeline(pipline_steps)
dump_classifier_and_data(clf, my_dataset, features_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment