<jupyter_start><jupyter_text>Simple Linear Regression  Importing the libraries<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import pandas as pd<jupyter_output><empty_output><jupyter_text>Importing the dataset<jupyter_code>dataset=pd.read_csv('Salary_Data.csv')
X=dataset.iloc[:,:-1].values
y=dataset.iloc[:,-1].values<jupyter_output><empty_output><jupyter_text>Splitting the dataset into the Training set and Test set<jupyter_code>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)<jupyter_output><empty_output><jupyter_text>Training the Simple Linear Regression model on the Training set<jupyter_code>from sklearn.linear_model import LinearRegression
regressor=LinearRegression()
regressor.fit(X_train,y_train)<jupyter_output><empty_output><jupyter_text>Predicting the Test set results<jupyter_code>y_pred=regressor.predict(X_test)<jupyter_output><empty_output><jupyter_text>Visualising the Training set results<jupyter_code>plt.scatter(X_train,y_train,color='red')
plt.plot(X_train,regressor.predict(X_train),color='blue')
plt.title('Salary vs Experience')
plt.xlabel('Years of experience')
plt.ylabel('Salary')<jupyter_output><empty_output><jupyter_text>Visualising the Test set results<jupyter_code>plt.scatter(X_test,y_test,color='red')
plt.plot(X_train,regressor.predict(X_train),color='blue')
plt.title('Salary vs Experience')
plt.xlabel('Years of experience')
plt.ylabel('Salary')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11578947368421053, 'fraction_numerical': 0.003289473684210526, 'mean_word_length': 13.766990291262136, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '563450', 'license': 'MIT', 'n_tokens_mistral': 569, 'n_tokens_neox': 546, 'n_words': 76, 'path': 'Copy_of_simple_linear_regression.ipynb', 'repo_name': 'JeevanNaikOP/learn-python', 'size': '1520'}