Skip to content

Instantly share code, notes, and snippets.

@vicotrbb
Last active May 6, 2020 21:37
Show Gist options
  • Save vicotrbb/c6589f7e8c766036e9ab1c07c6872b31 to your computer and use it in GitHub Desktop.
Save vicotrbb/c6589f7e8c766036e9ab1c07c6872b31 to your computer and use it in GitHub Desktop.
x = pd.DataFrame(iris_dataset.data, columns=iris_dataset.feature_names)
y = pd.DataFrame(iris_dataset.target, columns=['target'])
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=5)
model = LinearRegression()
model.fit(x_train, y_train)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment