Fix sample example documentation for python pkg (#61)

This commit is contained in:
Pranav Sharma 2018-11-29 17:50:12 -08:00 committed by GitHub
parent 1ea32a097a
commit 39ebccbc8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,11 +26,11 @@ replaces *scikit-learn* to compute the predictions.
# Train a model.
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForest
from sklearn.ensemble import RandomForestClassifier
iris = load_iris()
X, y = iris.data, iris.target
X_train, X_test, y_train, y_test = train_test_split(X, y)
clr = RandomForest()
clr = RandomForestClassifier()
clr.fit(X_train, y_train)
# Convert into ONNX format with onnxmltools