region:us
import matplotlib.pyplot as plt
import pandas as pd
import Transformers as d
# Importing the dataset
dataset = pd.read_csv('satf.csv')
dataset.head(10)


X = dataset.iloc[:,:1] 
y = dataset.iloc[:, -1]

X
y

# 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)


X_train
X_test
y_train
y_test 


# Fitting Simple Linear Regression to the Training set
from sklearn.linear_model import LinearRegression
regressor = LinearRegression()
regressor.fit(X_train, y_train)

regressor.score(X_train, y_train)
regressor.score(X_test, y_test)

# Predicting the Test set results
y_pred = regressor.predict(X_test)
print(y_pred[:5] )
print(y_test [:5])
 


# Visualising the Training set results
#plt.scatter(X_train, y_train, color = 'red')
