Guest User

Untitled

a guest
Jul 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. # Data Preprocessing Template
  2.  
  3. # Importing the libraries
  4. import numpy as np
  5. import matplotlib.pyplot as plt
  6. import pandas as pd
  7.  
  8. # Importing the dataset
  9. dataset = pd.read_csv('Data.csv')
  10. X = dataset.iloc[:, :-1].values
  11. y = dataset.iloc[:, 3].values
  12.  
  13. # Splitting the dataset into the Training set and Test set
  14. from sklearn.model_selection import train_test_split
  15. X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0)
  16.  
  17. # Feature Scaling
  18. """from sklearn.preprocessing import StandardScaler
  19. sc_X = StandardScaler()
  20. X_train = sc_X.fit_transform(X_train)
  21. X_test = sc_X.transform(X_test)
  22. sc_y = StandardScaler()
  23. y_train = sc_y.fit_transform(y_train)"""
Add Comment
Please, Sign In to add comment