Last active
May 9, 2019 08:57
-
-
Save srishilesh/3400daab89bf1618927e1fa1d787b134 to your computer and use it in GitHub Desktop.
Data preprocessing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing the libraries | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
# Importing the dataset | |
dataset = pd.read_csv('./Data.csv') | |
X = dataset.iloc[:, :-1].values | |
y = dataset.iloc[:, 3].values | |
# Splitting the dataset into the Training set and Test set | |
from sklearn.model_selection import train_test_split | |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment