<jupyter_start><jupyter_text><jupyter_code>import numpy as np
import pandas as pd 
import seaborn as sns
import matplotlib.pyplot as plt

dataset=pd.read_csv("/content/Admission_Predict_Ver1.1.csv")
dataset.head()

updated_dataset=dataset.iloc[:,1:9]
updated_dataset.head()
updated_dataset.isna().sum()
updated_dataset.corr(method="pearson")
plt.subplots(figsize=(20,4))
sns.barplot(x="GRE Score",y="Chance of Admit ",data=dataset)
plt.subplots(figsize=(25,5))
sns.barplot(x="TOEFL Score",y="Chance of Admit ",data=dataset)
plt.subplots(figsize=(20,4))
sns.barplot(x="University Rating",y="Chance of Admit ",data=dataset)
plt.subplots(figsize=(15,5))
sns.barplot(x="SOP",y="Chance of Admit ",data=dataset)
#plt.subplots(figsize=(15,4))
#sns.barplot(x="CGPA",y="Chance of Admit ",data=dataset)
plt.subplots(figsize=(15,5))
sns.barplot(x="Research",y="Chance of Admit ",data=dataset)


X=updated_dataset.iloc[:,:7]
y=updated_dataset["Chance of Admit "]
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=50)
from sklearn.linear_model import LinearRegression
#Linear Regression
Linear=LinearRegression()
Linear.fit(X_train,y_train)
y_pred=Linear.predict(X_test)
y_pred

from sklearn.metrics import mean_absolute_error,r2_score
print("R2 score of the model is ",r2_score(y_pred,y_test))
print("mean_absolute_error  of the model is ",mean_absolute_error(y_pred,y_test))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14789687924016282, 'fraction_numerical': 0.0203527815468114, 'mean_word_length': 10.346153846153847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '477803', 'license': 'MIT', 'n_tokens_mistral': 596, 'n_tokens_neox': 571, 'n_words': 91, 'path': 'LinearRegression_AdmissionPrediction.ipynb', 'repo_name': 'hemantupadhyay24/Machine-Learning-', 'size': '1474'}