Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Importing the libraries
- import numpy as np
- import matplotlib.pyplot as plt
- import pandas as pd
- # Importing the dataset
- dataset = pd.read_csv('Salary_Data.csv')
- X = dataset.iloc[:,:-1].values
- y = dataset.iloc[:, 1].values
- # Splitting the dataset into the Traing 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=1/3, random_state = 0)
Advertisement
Add Comment
Please, Sign In to add comment