The program code is used for prediction of Graduate Admissions which uses the Linear Regression Model and cross-validation to split the dataset into training and testing data, including R squared to show how the data fit the model. The program code also allows the user to input it performs or scores to check whether he or she has the chance of admission. The dataset was downloaded from www.kaggle.com, below is the dataset download link; https://www.kaggle.com/mohansacharya/graduate-admissions #importing the essential libraries import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split #importing dataset df=pd.read_csv('Admission_Predict_Ver1.1.csv',index_col=0) #independent or explanatory variables feature_cols=['GRE Score','TOEFL Score','LOR','CGPA','Research'] X=np.array(df[feature_cols],dtype=np.float64) #dependent or response variable y...
Comments
Post a Comment