Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # coding: utf-8
- # In[19]:
- import numpy as np
- import pandas as pd
- from sklearn.model_selection import train_test_split
- from sklearn import datasets
- # In[22]:
- iris = datasets.load_iris()
- X = iris.data[:, :2]
- y = iris.target
- # In[23]:
- X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 42)
- print('lets check the shape of the data ')
- print(X_train.shape[0], X_test.shape[0])
- print('\n\n')
- for i in range(5) :
- print(X_train[i,:], y_train[i])
- # In[ ]:
- # In[ ]:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement