November 2017
Intermediate to advanced
1035 pages
11h 31m
English
In this recipe, we're going to show how you can keep your model around for a later usage. For example, you might want to actually use a model to predict the outcome and automatically make a decision.
In this recipe, we will perform the following tasks:
To persist models with joblib, the following code can be used:
>>> from sklearn import datasets, tree >>> X, y = datasets.make_classification() >>> dt = tree.DecisionTreeClassifier() >>> dt.fit(X, y) DecisionTreeClassifier(compute_importances=None, criterion='gini', max_depth=None, max_features=None, max_leaf_nodes=None, min_density=None, min_samples_leaf=1, min_samples_split=2, ...
Read now
Unlock full access