scikit learn split data set site:stackoverflow.com code example
Example: 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:]