Skip to content

Instantly share code, notes, and snippets.

Created Oct 13, 2020
What would you like to do?
import numpy as np
from sklearn.preprocessing import MinMaxScaler
demo = np.random.randint(10, 200, (20 ,2))
scalarModel = MinMaxScaler()
scalarModel = MinMaxScaler()
featureData = scalarModel.fit_transform(demo)
import pandas as pan
data = pan.DataFrame(data=featureData, columns=['c1', 'c2', 'c3', 'label'])
X = data[['c1', 'c2', 'c3']]
y = data['label']
from sklearn.model_selection import train_test_split
Xtrain, Xtest, ytrain, ytest = train_test_split(X, y, test_size=0.30, random_state=42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment