Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

scikit learn split data set site:stackoverflow.com

train_pct_index = int(0.8 * len(X))
X_train, X_test = X[:train_pct_index], X[train_pct_index:]
y_train, y_test = y[:train_pct_index], y[train_pct_index:]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #scikit #learn #split #data #set
ADD COMMENT
Topic
Name
6+8 =