Last active
March 24, 2020 13:29
-
-
Save ghodsizadeh/4ea7ce637447d4804010318706da8f3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn import datasets | |
iris = datasets.load_iris() | |
X = iris.data[:,[2,3]] # just get two features of iris dataset, to plot decision boundry | |
y = iris.target | |
print('Class Labels', np.unique(y)) | |
from sklearn.model_selection import train_test_split | |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size =0.3, random_state =1, stratify =y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment