November 2017
Intermediate to advanced
374 pages
10h 19m
English
As before, load the last two features of the iris dataset. Split the data into training and testing sets:
from sklearn import datasetsiris = datasets.load_iris()X = iris.data[:,2:]y = iris.targetfrom sklearn.model_selection import train_test_splitX_train, X_test, y_train, y_test = train_test_split(X, y, stratify = y,random_state = 7)
Read now
Unlock full access