Splitting the datasets in scikit-learn #coding #code #pythondatastructures #python #pythondatatypes

preview_player
Показать описание
#coding #python #pythonprogramming #codingtutorial #machine #machinelearning #ai #artificialintelligence

Like share and subscribe
Рекомендации по теме
Комментарии
Автор

Code :
from sklearn.datasets import load_iris

iris = load_iris()

X = iris.data
y = iris.target

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)

print(X_train.shape)
print(X_test.shape)
print(y_train.shape)
print(y_test.shape)

SM_Programmer