├── Correlation.png ├── Data_Preprocessing.ipynb ├── Data_Visualization.ipynb ├── EDA ├── .ipynb_checkpoints │ └── Data_Visualization_and_Feature_Extraction-checkpoint.ipynb ├── Correlation.png ├── Data_Visualization_and_Feature_Extraction.ipynb ├── Data_Visualization_and_Feature_Extraction.py ├── Family_support_plot.png ├── Going_out_plot.png ├── Grade_Age.png ├── Grade_Failure_status.png ├── Grade_Parental_status.png ├── Grade_Relationshipstatus.png ├── Grade_family support.png ├── Grade_fathers_edu.png ├── Grade_fathers_job.png ├── Grade_freetime_status.png ├── Grade_gender.png ├── Grade_going_out.png ├── Grade_internet_status.png ├── Grade_location.png ├── Grade_mhigher_education_status.png ├── Grade_mothers_edu.png ├── Grade_mothers_fathers_edu.png ├── Grade_mothers_fathers_job.png ├── Grade_mothers_job.png ├── Grade_overall_health.png ├── Grade_regularity.png ├── Grade_study_time.png ├── Grade_weekend_alchol.png ├── Grade_workday_alchol.png ├── Guardian_plot.png ├── Parent_Education_plot.png ├── Parent_Job_plot.png ├── Pstatus_plot.png ├── Reason_plot.png ├── Study_time_plot.png ├── address_plot.png ├── age_plot.png ├── alcohol_consumption_plot.png ├── attend_nursery_plot.png ├── extracurricular_plot.png ├── failures_plot.png ├── fam_relationship_plot.png ├── family_plot.png ├── free_time_plot.png ├── gender.png ├── higher_education_plot.png ├── internet_plot.png ├── paid_claases_plot.png ├── rom_relationship_plot.png ├── school.png ├── school_support_plot.png └── travel_time_plot.png ├── Evaluation.txt ├── Family_support_plot.png ├── Feature_Engineering.png ├── Going_out_plot.png ├── Grade_Parental_status.png ├── Grade_Relationshipstatus.png ├── Grade_fathers_edu.png ├── Grade_fathers_job.png ├── Grade_gender.png ├── Grade_going_out.png ├── Grade_internet_status.png ├── Grade_location.png ├── Grade_mhigher_education_status.png ├── Grade_mothers_edu.png ├── Grade_mothers_job.png ├── Grade_overall_health.png ├── Grade_regularity.png ├── Grade_study_time.png ├── Grade_weekend_alchol.png ├── Grade_workday_alchol.png ├── Guardian_plot.png ├── ML PROJECT REPORT (2).pdf ├── Model.ipynb ├── Model_prediction.ipynb ├── Model_prediction.py ├── PROJECT REPORT.pdf ├── Parent_Education_plot.png ├── Parent_Job_plot.png ├── Pstatus_plot.png ├── README.md ├── ROC1.png ├── ROC2.png ├── ROC3.png ├── ROC4.png ├── Reason_plot.png ├── STUDENT_GRADE.ipynb ├── STUDENT_GRADE_LABEL_ENCODING.ipynb ├── STUDENT_GRADE_ONE_HOT_ENCODING.ipynb ├── Student_Performance_Prediction_Model.ipynb ├── Study_time_plot.png ├── Untitled.ipynb ├── address_plot.png ├── age_plot.png ├── alcohol_consumption_plot.png ├── attend_nursery_plot.png ├── confusion_matrix.png ├── correlation_plot.png ├── extracurricular_plot.png ├── failures_plot.png ├── fam_relationship_plot.png ├── family_plot.png ├── features.csv ├── free_time_plot.png ├── gender.png ├── gender_plot.png ├── grades.png ├── higher_education_plot.png ├── input ├── features.csv ├── student-mat.csv ├── student-por.csv └── students.csv ├── internet_plot.png ├── model_evaluation.ipynb ├── model_evaluation_ver2.ipynb ├── model_xgb ├── paid_claases_plot.png ├── pickle ├── model_ada.pkl ├── model_dt.pkl ├── model_lr.pkl ├── model_rf.pkl ├── model_svm.pkl └── model_xgb.pkl ├── rom_relationship_plot.png ├── school.png ├── school_plot.png ├── school_support_plot.png ├── student-mat.csv ├── student-por.csv ├── student.csv ├── students.csv └── travel_time_plot.png /Correlation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Correlation.png -------------------------------------------------------------------------------- /Data_Preprocessing.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.6.6" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 2 32 | } 33 | -------------------------------------------------------------------------------- /EDA/Correlation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Correlation.png -------------------------------------------------------------------------------- /EDA/Data_Visualization_and_Feature_Extraction.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Data Visualization 5 | 6 | # In[217]: 7 | 8 | 9 | import numpy as np 10 | import pandas as pd 11 | import sklearn 12 | import matplotlib.pyplot as plt 13 | import seaborn as sns 14 | 15 | 16 | # In[218]: 17 | 18 | 19 | train_por = pd.read_csv('../input/student-por.csv') 20 | train_mat = pd.read_csv('../input/student-mat.csv') 21 | 22 | 23 | # In[219]: 24 | 25 | 26 | train_por.head() 27 | 28 | 29 | # In[220]: 30 | 31 | 32 | train_mat.head() 33 | 34 | 35 | # In[221]: 36 | 37 | 38 | train_por.shape 39 | 40 | 41 | # In[222]: 42 | 43 | 44 | train_por.dropna().shape #no null values in train_por 45 | 46 | 47 | # In[223]: 48 | 49 | 50 | train_mat.shape 51 | 52 | 53 | # In[224]: 54 | 55 | 56 | train_mat.dropna().shape #no null values in train_mat 57 | 58 | 59 | # In[225]: 60 | 61 | 62 | subset=train_por.columns 63 | 64 | 65 | # In[226]: 66 | 67 | 68 | train_por=train_por.drop_duplicates(subset=None, keep='first', inplace=False) 69 | train_por.shape #no duplicates in train_por 70 | 71 | 72 | # In[227]: 73 | 74 | 75 | subset=train_mat.columns 76 | 77 | 78 | # In[228]: 79 | 80 | 81 | train_mat=train_mat.drop_duplicates(subset=None, keep='first', inplace=False) 82 | train_mat.shape #no duplicates in train_mat 83 | 84 | 85 | # In[229]: 86 | 87 | 88 | train_por['subject']='Portuguese' 89 | 90 | 91 | # In[230]: 92 | 93 | 94 | train_mat['subject']='Maths' 95 | 96 | 97 | # In[231]: 98 | 99 | 100 | train=pd.concat([train_por, train_mat], axis=0) #combining two data files with subject as discriminant column to distinguish columns 101 | 102 | 103 | # In[232]: 104 | 105 | 106 | train.head() 107 | 108 | 109 | # In[233]: 110 | 111 | 112 | train.to_csv('../input/students.csv', index=False) 113 | 114 | 115 | # In[234]: 116 | 117 | 118 | # contains all the merged data 119 | data = pd.read_csv('../input/students.csv') 120 | 121 | 122 | # In[235]: 123 | 124 | 125 | def correlation(df): 126 | corr = df.corr() 127 | fig, ax = plt.subplots(figsize=(20, 15)) 128 | colormap = sns.diverging_palette(150,50, as_cmap=True) 129 | sns.heatmap(corr, cmap=colormap, annot=True, fmt=".2f") 130 | plt.xticks(range(len(corr.columns)), corr.columns); 131 | plt.yticks(range(len(corr.columns)), corr.columns) 132 | plt.savefig('Correlation.png', bbox_inches='tight') 133 | plt.show() 134 | 135 | 136 | # In[236]: 137 | 138 | 139 | correlation(data) 140 | 141 | 142 | # In[237]: 143 | 144 | 145 | data.columns 146 | 147 | 148 | # In[238]: 149 | 150 | 151 | f, ax = plt.subplots() 152 | figure = sns.countplot(x = 'school', data=data, order=['GP','MS']) 153 | ax = ax.set(ylabel="Count", xlabel="school") 154 | figure.grid(False) 155 | plt.title('School Distribution') 156 | plt.savefig('school.png', bbox_inches='tight') 157 | 158 | 159 | # In[239]: 160 | 161 | 162 | f, ax = plt.subplots() 163 | figure = sns.countplot(x = 'sex', data=data, order=['M','F']) 164 | ax = ax.set(ylabel="Count", xlabel="gender") 165 | figure.grid(False) 166 | plt.title('Gender Distribution') 167 | plt.savefig('gender.png', bbox_inches='tight') 168 | 169 | 170 | # In[240]: 171 | 172 | 173 | data['age'].max() 174 | 175 | 176 | # In[241]: 177 | 178 | 179 | data['age'].min() 180 | 181 | 182 | # In[242]: 183 | 184 | 185 | f, ax = plt.subplots() 186 | figure = sns.countplot(x = 'age', data=data, order=[15,16,17,18,19,20,21,22]) 187 | ax = ax.set(ylabel="Count", xlabel="age") 188 | figure.grid(False) 189 | plt.title('Age Distribution') 190 | plt.savefig('age_plot.png', bbox_inches='tight') 191 | 192 | 193 | # In[243]: 194 | 195 | 196 | f, ax = plt.subplots() 197 | figure = sns.countplot(x = 'address', data=data, order=['U','R']) 198 | ax = ax.set(ylabel="Count", xlabel="address") 199 | figure.grid(False) 200 | plt.title('Address Distribution') 201 | plt.savefig('address_plot.png', bbox_inches='tight') 202 | 203 | 204 | # In[244]: 205 | 206 | 207 | data['famsize'].unique() 208 | 209 | 210 | # In[245]: 211 | 212 | 213 | f, ax = plt.subplots() 214 | figure = sns.countplot(x = 'famsize', data=data, order=['GT3','LE3']) 215 | ax = ax.set(ylabel="Count", xlabel="famsize") 216 | figure.grid(False) 217 | plt.title('Family Distribution') 218 | plt.savefig('family_plot.png', bbox_inches='tight') 219 | 220 | 221 | # In[ ]: 222 | 223 | 224 | 225 | 226 | 227 | # In[246]: 228 | 229 | 230 | f, ax = plt.subplots() 231 | figure = sns.countplot(x = 'Pstatus', data=data, order=['A','T']) 232 | ax = ax.set(ylabel="Count", xlabel="status") 233 | figure.grid(False) 234 | plt.title('Parents status Distribution') 235 | plt.savefig('Pstatus_plot.png', bbox_inches='tight') 236 | 237 | 238 | # In[247]: 239 | 240 | 241 | #(numeric: 0 - none, 1 - primary education (4th grade), 2 - 5th to 9th grade, 3 - secondary education or 4 - higher education) 242 | f, ax = plt.subplots() 243 | figure = sns.countplot(x = 'Medu', data=data, order=[0,1,2,3,4]) 244 | ax = ax.set(ylabel="Count", xlabel="Mother Education") 245 | figure.grid(False) 246 | plt.title('Parent Education Distribution') 247 | f, ax = plt.subplots() 248 | figure = sns.countplot(x = 'Fedu', data=data, order=[0,1,2,3,4]) 249 | ax = ax.set(ylabel="Count", xlabel="Father Education") 250 | figure.grid(False) 251 | plt.savefig('Parent_Education_plot.png', bbox_inches='tight') 252 | 253 | 254 | # In[248]: 255 | 256 | 257 | # (nominal: 'teacher', 'health' care related, civil 'services' (e.g. administrative or police), 'at_home' or 'other') 258 | f, ax = plt.subplots() 259 | figure = sns.countplot(x = 'Mjob', data=data, order=['teacher','health','services','at_home','other']) 260 | ax = ax.set(ylabel="Count", xlabel="Mother Job") 261 | figure.grid(False) 262 | plt.title('Parent Job Distribution') 263 | f, ax = plt.subplots() 264 | figure = sns.countplot(x = 'Fjob', data=data, order=['teacher','health','services','at_home','other']) 265 | ax = ax.set(ylabel="Count", xlabel="Father Job") 266 | figure.grid(False) 267 | plt.savefig('Parent_Job_plot.png', bbox_inches='tight') 268 | 269 | 270 | # In[249]: 271 | 272 | 273 | #(nominal: close to 'home', school 'reputation', 'course' preference or 'other') 274 | f, ax = plt.subplots() 275 | figure = sns.countplot(x = 'reason', data=data, order=['home','reputation','course','other']) 276 | ax = ax.set(ylabel="Count", xlabel="reason to chose this school") 277 | figure.grid(False) 278 | plt.title('Reason Distribution') 279 | plt.savefig('Reason_plot.png', bbox_inches='tight') 280 | 281 | 282 | # In[250]: 283 | 284 | 285 | #(nominal: 'mother', 'father' or 'other') 286 | f, ax = plt.subplots() 287 | figure = sns.countplot(x = 'guardian', data=data, order=['mother','father','other']) 288 | ax = ax.set(ylabel="Count", xlabel="Guardian") 289 | figure.grid(False) 290 | plt.title('Guardian Distribution') 291 | plt.savefig('Guardian_plot.png', bbox_inches='tight') 292 | 293 | 294 | # In[251]: 295 | 296 | 297 | # (numeric: 1 - <15 min., 2 - 15 to 30 min., 3 - 30 min. to 1 hour, or 4 - >1 hour) 298 | f, ax = plt.subplots() 299 | figure = sns.countplot(x = 'traveltime', data=data, order=[1,2,3,4]) 300 | ax = ax.set(ylabel="Count", xlabel="travel time") 301 | figure.grid(False) 302 | plt.title('Travel Time Distribution') 303 | plt.savefig('travel_time_plot.png', bbox_inches='tight') 304 | 305 | 306 | # In[252]: 307 | 308 | 309 | # (numeric: 1 - <2 hours, 2 - 2 to 5 hours, 3 - 5 to 10 hours, or 4 - >10 hours) 310 | f, ax = plt.subplots() 311 | figure = sns.countplot(x = 'studytime', data=data, order=[1,2,3,4]) 312 | ax = ax.set(ylabel="Count", xlabel="study time") 313 | figure.grid(False) 314 | plt.title('Study Time Distribution') 315 | plt.savefig('Study_time_plot.png', bbox_inches='tight') 316 | 317 | 318 | # In[253]: 319 | 320 | 321 | #(numeric: n if 1<=n<3, else 4) 322 | f, ax = plt.subplots() 323 | figure = sns.countplot(x = 'failures', data=data, order=[0,1,2,3]) 324 | ax = ax.set(ylabel="Count", xlabel="failures") 325 | figure.grid(False) 326 | plt.title('failures Distribution') 327 | plt.savefig('failures_plot.png', bbox_inches='tight') 328 | 329 | 330 | # In[254]: 331 | 332 | 333 | f, ax = plt.subplots() 334 | figure = sns.countplot(x = 'schoolsup', data=data, order=['yes','no']) 335 | ax = ax.set(ylabel="Count", xlabel="School Support") 336 | figure.grid(False) 337 | plt.title('School Support Distribution') 338 | plt.savefig('school_support_plot.png', bbox_inches='tight') 339 | 340 | 341 | # In[255]: 342 | 343 | 344 | f, ax = plt.subplots() 345 | figure = sns.countplot(x = 'famsup', data=data, order=['yes','no']) 346 | ax = ax.set(ylabel="Count", xlabel="Family Support") 347 | figure.grid(False) 348 | plt.title('Family Support Distribution') 349 | plt.savefig('Family_support_plot.png', bbox_inches='tight') 350 | 351 | 352 | # In[256]: 353 | 354 | 355 | f, ax = plt.subplots() 356 | figure = sns.countplot(x = 'paid', data=data, order=['yes','no']) 357 | ax = ax.set(ylabel="Count", xlabel="extra paid classes") 358 | figure.grid(False) 359 | plt.title('Extra paid classes Distribution') 360 | plt.savefig('paid_claases_plot.png', bbox_inches='tight') 361 | 362 | 363 | # In[257]: 364 | 365 | 366 | f, ax = plt.subplots() 367 | figure = sns.countplot(x = 'activities', data=data, order=['yes','no']) 368 | ax = ax.set(ylabel="Count", xlabel="extra-curricular activities") 369 | figure.grid(False) 370 | plt.title('extra-curricular activities Distribution') 371 | plt.savefig('extracurricular_plot.png', bbox_inches='tight') 372 | 373 | 374 | # In[258]: 375 | 376 | 377 | f, ax = plt.subplots() 378 | figure = sns.countplot(x = 'nursery', data=data, order=['yes','no']) 379 | ax = ax.set(ylabel="Count", xlabel="attended nursery") 380 | figure.grid(False) 381 | plt.title('attended nursery Distribution') 382 | plt.savefig('attend_nursery_plot.png', bbox_inches='tight') 383 | 384 | 385 | # In[259]: 386 | 387 | 388 | f, ax = plt.subplots() 389 | figure = sns.countplot(x = 'higher', data=data, order=['yes','no']) 390 | ax = ax.set(ylabel="Count", xlabel="wants to take higher education") 391 | figure.grid(False) 392 | plt.title('Students who want to take higher education Distribution') 393 | plt.savefig('higher_education_plot.png', bbox_inches='tight') 394 | 395 | 396 | # In[260]: 397 | 398 | 399 | f, ax = plt.subplots() 400 | figure = sns.countplot(x = 'internet', data=data, order=['yes','no']) 401 | ax = ax.set(ylabel="Count", xlabel="Internet access at home") 402 | figure.grid(False) 403 | plt.title('Internet access at home Distribution') 404 | plt.savefig('school_support_plot.png', bbox_inches='tight') 405 | plt.savefig('internet_plot.png', bbox_inches='tight') 406 | 407 | 408 | # In[261]: 409 | 410 | 411 | f, ax = plt.subplots() 412 | figure = sns.countplot(x = 'romantic', data=data, order=['yes','no']) 413 | ax = ax.set(ylabel="Count", xlabel="With a romantic relationship") 414 | figure.grid(False) 415 | plt.title('Students with a romantic relationship Distribution') 416 | plt.savefig('rom_relationship_plot.png', bbox_inches='tight') 417 | 418 | 419 | # In[262]: 420 | 421 | 422 | f, ax = plt.subplots() 423 | figure = sns.countplot(x = 'famrel', data=data, order=[1,2,3,4,5]) 424 | ax = ax.set(ylabel="Count", xlabel="family relationship") 425 | figure.grid(False) 426 | plt.title('family relationship Distribution') 427 | plt.savefig('fam_relationship_plot.png', bbox_inches='tight') 428 | 429 | 430 | # In[263]: 431 | 432 | 433 | f, ax = plt.subplots() 434 | figure = sns.countplot(x = 'freetime', data=data, order=[1,2,3,4,5]) 435 | ax = ax.set(ylabel="Count", xlabel="Freetime") 436 | figure.grid(False) 437 | plt.title('Free time Distribution') 438 | plt.savefig('free_time_plot.png', bbox_inches='tight') 439 | 440 | 441 | # In[264]: 442 | 443 | 444 | f, ax = plt.subplots() 445 | figure = sns.countplot(x = 'goout', data=data, order=[1,2,3,4,5]) 446 | ax = ax.set(ylabel="Count", xlabel="Going Out") 447 | figure.grid(False) 448 | plt.title('Going Out Distribution') 449 | plt.savefig('Going_out_plot.png', bbox_inches='tight') 450 | 451 | 452 | # In[265]: 453 | 454 | 455 | f, ax = plt.subplots() 456 | figure = sns.countplot(x = 'Dalc', data=data, order=[1,2,3,4,5]) 457 | ax = ax.set(ylabel="Count", xlabel="Working") 458 | figure.grid(False) 459 | plt.title('Working day alcohol consumption Distribution') 460 | f, ax = plt.subplots() 461 | figure = sns.countplot(x = 'Walc', data=data, order=[1,2,3,4,5]) 462 | ax = ax.set(ylabel="Count", xlabel="Weekends") 463 | figure.grid(False) 464 | plt.title('Weekend alcohol consumption Distribution') 465 | plt.savefig('alcohol_consumption_plot.png', bbox_inches='tight') 466 | 467 | 468 | # In[266]: 469 | 470 | 471 | # convert finalscore to categorical variable 472 | data = pd.read_csv('../input/students.csv') 473 | data.head() 474 | data['FinalGrade'] = 'na' 475 | data.loc[(data.G3 >= 18) & (data.G3 <= 20), 'FinalGrade'] = 'Excellent' 476 | data.loc[(data.G3 >= 15) & (data.G3 <= 17), 'FinalGrade'] = 'Good' 477 | data.loc[(data.G3 >= 11) & (data.G3 <= 14), 'FinalGrade'] = 'Satisfactory' 478 | data.loc[(data.G3 >= 6) & (data.G3 <= 10), 'FinalGrade'] = 'Poor' 479 | data.loc[(data.G3 >= 0) & (data.G3 <= 5), 'FinalGrade'] = 'Failure' 480 | data.head(5) 481 | 482 | # data.drop(['Grade'],axis=1) 483 | 484 | 485 | # In[267]: 486 | 487 | 488 | # relationship status 489 | perc = (lambda col: col/col.sum()) 490 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 491 | relationship_index = pd.crosstab(index=data.FinalGrade, columns=data.romantic) 492 | romantic_index = relationship_index.apply(perc).reindex(index) 493 | romantic_index.plot.bar(fontsize=16, figsize=(14,8)) 494 | plt.title('Grade By Relationship Status', fontsize=20) 495 | plt.ylabel('Percentage of Students', fontsize=16) 496 | plt.xlabel('Final Grade', fontsize=16) 497 | plt.savefig('Grade_Relationshipstatus.png', bbox_inches='tight') 498 | plt.show() 499 | 500 | 501 | # In[268]: 502 | 503 | 504 | # relationship status 505 | perc = (lambda col: col/col.sum()) 506 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 507 | relationship_index = pd.crosstab(index=data.FinalGrade, columns=data.famsup) 508 | romantic_index = relationship_index.apply(perc).reindex(index) 509 | romantic_index.plot.bar(fontsize=16, figsize=(14,8)) 510 | plt.title('Grade By family support Status', fontsize=20) 511 | plt.ylabel('Percentage of Students', fontsize=16) 512 | plt.xlabel('Final Grade', fontsize=16) 513 | plt.savefig('Grade_family support.png', bbox_inches='tight') 514 | plt.show() 515 | 516 | 517 | # In[269]: 518 | 519 | 520 | # relationship status 521 | perc = (lambda col: col/col.sum()) 522 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 523 | relationship_index = pd.crosstab(index=data.FinalGrade, columns=data.age) 524 | romantic_index = relationship_index.apply(perc).reindex(index) 525 | romantic_index.plot.bar(fontsize=16, figsize=(14,8)) 526 | plt.title('Grade By age ', fontsize=20) 527 | plt.ylabel('Percentage of Students', fontsize=16) 528 | plt.xlabel('Final Grade', fontsize=16) 529 | plt.savefig('Grade_Age.png', bbox_inches='tight') 530 | plt.show() 531 | 532 | 533 | # In[270]: 534 | 535 | 536 | # Dalc - workday alcohol consumption 537 | alcohol_index = pd.crosstab(index=data.FinalGrade, columns=data.Dalc) 538 | workday_alcohol_index = alcohol_index.apply(perc).reindex(index) 539 | workday_alcohol_index.plot.bar(fontsize=16, figsize=(14,8)) 540 | plt.title('Grade By workday alcohol Consumption', fontsize=20) 541 | plt.ylabel('Percentage of Students ', fontsize=16) 542 | plt.xlabel('Final Grade', fontsize=16) 543 | plt.savefig('Grade_workday_alchol.png', bbox_inches='tight') 544 | plt.show() 545 | 546 | 547 | # In[271]: 548 | 549 | 550 | # Walc - weekday alcohol consumption 551 | alcohol_index = pd.crosstab(index=data.FinalGrade, columns=data.Walc) 552 | weekend_alcohol_index = alcohol_index.apply(perc).reindex(index) 553 | 554 | weekend_alcohol_index.plot.bar(colormap='winter',fontsize=16, figsize=(14,8)) 555 | plt.title('Grade By weekend alcohol Consumption', fontsize=20) 556 | plt.ylabel('Percentage of Students ', fontsize=16) 557 | plt.xlabel('Final Grade', fontsize=16) 558 | plt.savefig('Grade_weekend_alchol.png', bbox_inches='tight') 559 | plt.show() 560 | 561 | 562 | # In[272]: 563 | 564 | 565 | # health - current health status 566 | health_index = pd.crosstab(index=data.FinalGrade, columns=data.health) 567 | Overall_health_index = health_index.apply(perc).reindex(index) 568 | 569 | Overall_health_index.plot.bar(colormap='summer',fontsize=16, figsize=(14,8)) 570 | plt.title('Grade By Overall health', fontsize=20) 571 | plt.ylabel('Percentage of Students ', fontsize=16) 572 | plt.xlabel('Final Grade', fontsize=16) 573 | plt.savefig('Grade_overall_health.png', bbox_inches='tight') 574 | plt.show() 575 | 576 | 577 | # In[273]: 578 | 579 | 580 | # goout - going out with friends (numeric: from 1 - very low to 5 - very high) 581 | goout_index = pd.crosstab(index=data.FinalGrade, columns=data.goout) 582 | Overall_goout_index = goout_index.apply(perc).reindex(index) 583 | Overall_goout_index.plot.bar(colormap='jet',fontsize=16, figsize=(14,8)) 584 | plt.title('Grade By Going Out frequency', fontsize=20) 585 | plt.ylabel('Percentage of Students ', fontsize=16) 586 | plt.xlabel('Final Grade', fontsize=16) 587 | plt.savefig('Grade_going_out.png', bbox_inches='tight') 588 | plt.show() 589 | 590 | 591 | # In[274]: 592 | 593 | 594 | #absences - number of school absences (numeric: from 0 to 93) 595 | data.head() 596 | data['Regularity'] = 'na' 597 | data.loc[(data.absences >= 0) & (data.absences <= 9), 'Regularity'] = 'Always Regular' 598 | data.loc[(data.absences >= 10) & (data.absences <= 29), 'Regularity'] = 'Mostly Regular' 599 | data.loc[(data.absences >= 30) & (data.absences <= 49), 'Regularity'] = 'Regular' 600 | data.loc[(data.absences >= 50) & (data.absences <= 79), 'Regularity'] = 'Irregular' 601 | data.loc[(data.absences >= 80)& (data.absences <= 93), 'Regularity'] = 'Highly Irregular' 602 | data.head() 603 | 604 | 605 | # In[275]: 606 | 607 | 608 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 609 | absences = pd.crosstab(index=data.FinalGrade, columns=data.Regularity) 610 | absences = perc(absences) 611 | absences.plot.bar(fontsize=16, figsize=(14,8)) 612 | plt.title('Grade by students regularity', fontsize=20) 613 | plt.ylabel('Percentage of Students', fontsize=16) 614 | plt.xlabel('Final Grade', fontsize=16) 615 | plt.savefig('Grade_regularity.png', bbox_inches='tight') 616 | plt.show() 617 | 618 | 619 | 620 | # In[276]: 621 | 622 | 623 | # 31 G1 - first period grade (numeric: from 0 to 20) 624 | # 31 G2 - second period grade (numeric: from 0 to 20) 625 | # 32 G3 - final grade (numeric: from 0 to 20, output target) 626 | 627 | 628 | # In[277]: 629 | 630 | 631 | data['Grade1'] = 'na' 632 | data.loc[(data.G1 >= 18) & (data.G1 <= 20), 'Grade1'] = 'Excellent' 633 | data.loc[(data.G1 >= 15) & (data.G1 <= 17), 'Grade1'] = 'Good' 634 | data.loc[(data.G1 >= 11) & (data.G1 <= 14), 'Grade1'] = 'Satisfactory' 635 | data.loc[(data.G1 >= 6) & (data.G1 <= 10), 'Grade1'] = 'Poor' 636 | data.loc[(data.G1 >= 0) & (data.G1 <= 5), 'Grade1'] = 'Failure' 637 | 638 | data['Grade2'] = 'na' 639 | data.loc[(data.G2 >= 18) & (data.G2 <= 20), 'Grade2'] = 'Excellent' 640 | data.loc[(data.G2 >= 15) & (data.G2 <= 17), 'Grade2'] = 'Good' 641 | data.loc[(data.G2 >= 11) & (data.G2 <= 14), 'Grade2'] = 'Satisfactory' 642 | data.loc[(data.G2 >= 6) & (data.G2 <= 10), 'Grade2'] = 'Poor' 643 | data.loc[(data.G2 >= 0) & (data.G2 <= 5), 'Grade2'] = 'Failure' 644 | 645 | data.head(5) 646 | 647 | 648 | # In[278]: 649 | 650 | 651 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 652 | internet_index = pd.crosstab(index=data.FinalGrade, columns=data.internet) 653 | internet_index = internet_index.apply(perc).reindex(index) 654 | internet_index.plot.bar(fontsize=16, figsize=(14,8)) 655 | plt.title('Grade By internet Status', fontsize=20) 656 | plt.ylabel('Percentage of Students', fontsize=16) 657 | plt.xlabel('Final Grade', fontsize=16) 658 | plt.savefig('Grade_internet_status.png', bbox_inches='tight') 659 | 660 | plt.show() 661 | 662 | 663 | # In[279]: 664 | 665 | 666 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 667 | studytime_index = pd.crosstab(index=data.FinalGrade, columns=data.studytime) 668 | studytime_index = studytime_index.apply(perc).reindex(index) 669 | studytime_index.plot.bar(fontsize=16, figsize=(14,8)) 670 | plt.title('Grade By Study Time', fontsize=20) 671 | plt.ylabel('Percentage of Students', fontsize=16) 672 | plt.xlabel('Final Grade', fontsize=16) 673 | plt.savefig('Grade_study_time.png', bbox_inches='tight') 674 | 675 | plt.show() 676 | 677 | 678 | # In[280]: 679 | 680 | 681 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 682 | gender_index = pd.crosstab(index=data.FinalGrade, columns=data.sex) 683 | gender_index = gender_index.apply(perc).reindex(index) 684 | gender_index.plot.bar(fontsize=16, figsize=(14,8)) 685 | plt.title('Grade By gender', fontsize=20) 686 | plt.ylabel('Percentage of Students', fontsize=16) 687 | plt.xlabel('Final Grade', fontsize=16) 688 | plt.savefig('Grade_gender.png', bbox_inches='tight') 689 | 690 | plt.show() 691 | 692 | 693 | # In[281]: 694 | 695 | 696 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 697 | Location_index = pd.crosstab(index=data.FinalGrade, columns=data.address) 698 | Location_index = Location_index.apply(perc).reindex(index) 699 | Location_index.plot.bar(fontsize=16, figsize=(14,8)) 700 | plt.title('Grade By Location', fontsize=20) 701 | plt.ylabel('Percentage of Students', fontsize=16) 702 | plt.xlabel('Final Grade', fontsize=16) 703 | plt.savefig('Grade_location.png', bbox_inches='tight') 704 | 705 | plt.show() 706 | 707 | 708 | # In[282]: 709 | 710 | 711 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 712 | Mothers_index = pd.crosstab(index=data.FinalGrade, columns=data.Mjob) 713 | Mothers_index = Mothers_index.apply(perc).reindex(index) 714 | Mothers_index.plot.bar(fontsize=16, figsize=(14,8)) 715 | plt.title('Grade By Mothers Job', fontsize=20) 716 | plt.ylabel('Percentage of Students', fontsize=16) 717 | plt.xlabel('Final Grade', fontsize=16) 718 | plt.show() 719 | 720 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 721 | Fathers_index = pd.crosstab(index=data.FinalGrade, columns=data.Fjob) 722 | Fathers_index = Fathers_index.apply(perc).reindex(index) 723 | Fathers_index.plot.bar(fontsize=16, figsize=(14,8)) 724 | plt.title('Grade By Fathers Job', fontsize=20) 725 | plt.ylabel('Percentage of Students', fontsize=16) 726 | plt.xlabel('Final Grade', fontsize=16) 727 | plt.savefig('Grade_mothers_fathers_job.png', bbox_inches='tight') 728 | 729 | plt.show() 730 | 731 | 732 | # In[283]: 733 | 734 | 735 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 736 | Mothers_index = pd.crosstab(index=data.FinalGrade, columns=data.Medu) 737 | Mothers_index = Mothers_index.apply(perc).reindex(index) 738 | Mothers_index.plot.bar(fontsize=16, figsize=(14,8)) 739 | plt.title('Grade By Mothers Education', fontsize=20) 740 | plt.ylabel('Percentage of Students', fontsize=16) 741 | plt.xlabel('Final Grade', fontsize=16) 742 | plt.show() 743 | 744 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 745 | Fathers_index = pd.crosstab(index=data.FinalGrade, columns=data.Fedu) 746 | Fathers_index = Fathers_index.apply(perc).reindex(index) 747 | Fathers_index.plot.bar(fontsize=16, figsize=(14,8)) 748 | plt.title('Grade By Fathers Education', fontsize=20) 749 | plt.ylabel('Percentage of Students', fontsize=16) 750 | plt.xlabel('Final Grade', fontsize=16) 751 | plt.savefig('Grade_mothers_fathers_edu.png', bbox_inches='tight') 752 | 753 | plt.show() 754 | 755 | 756 | # In[284]: 757 | 758 | 759 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 760 | higher_index = pd.crosstab(index=data.FinalGrade, columns=data.higher) 761 | higher_index = higher_index.apply(perc).reindex(index) 762 | higher_index.plot.bar(fontsize=16, figsize=(14,8)) 763 | plt.title('Grade By higher education Status', fontsize=20) 764 | plt.ylabel('Percentage of Students', fontsize=16) 765 | plt.xlabel('Final Grade', fontsize=16) 766 | plt.savefig('Grade_mhigher_education_status.png', bbox_inches='tight') 767 | 768 | plt.show() 769 | 770 | 771 | # In[285]: 772 | 773 | 774 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 775 | status_index = pd.crosstab(index=data.FinalGrade, columns=data.Pstatus) 776 | status_index = status_index.apply(perc).reindex(index) 777 | status_index.plot.bar(fontsize=16, figsize=(14,8)) 778 | plt.title('Grade By Parental Status', fontsize=20) 779 | plt.ylabel('Percentage of Students', fontsize=16) 780 | plt.xlabel('Final Grade', fontsize=16) 781 | plt.savefig('Grade_Parental_status.png', bbox_inches='tight') 782 | 783 | plt.show() 784 | 785 | 786 | # In[286]: 787 | 788 | 789 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 790 | status_index = pd.crosstab(index=data.FinalGrade, columns=data.failures) 791 | status_index = status_index.apply(perc).reindex(index) 792 | status_index.plot.bar(fontsize=16, figsize=(14,8)) 793 | plt.title('Grade By failures', fontsize=20) 794 | plt.ylabel('Percentage of Students', fontsize=16) 795 | plt.xlabel('Final Grade', fontsize=16) 796 | plt.savefig('Grade_Failure_status.png', bbox_inches='tight') 797 | 798 | plt.show() 799 | 800 | 801 | # In[287]: 802 | 803 | 804 | index = ['Failure','Poor','Satisfactory','Good','Excellent'] 805 | status_index = pd.crosstab(index=data.FinalGrade, columns=data.freetime) 806 | status_index = status_index.apply(perc).reindex(index) 807 | status_index.plot.bar(fontsize=16, figsize=(14,8)) 808 | plt.title('Grade By freetime', fontsize=20) 809 | plt.ylabel('Percentage of Students', fontsize=16) 810 | plt.xlabel('Final Grade', fontsize=16) 811 | plt.savefig('Grade_freetime_status.png', bbox_inches='tight') 812 | 813 | plt.show() 814 | 815 | 816 | # In[288]: 817 | 818 | 819 | data.head() 820 | 821 | 822 | # In[289]: 823 | 824 | 825 | data.columns 826 | 827 | 828 | # In[290]: 829 | 830 | 831 | data.shape 832 | 833 | 834 | # In[291]: 835 | 836 | 837 | data.to_csv('../input/features.csv', index=False) 838 | 839 | 840 | # In[ ]: 841 | 842 | 843 | 844 | 845 | 846 | # In[ ]: 847 | 848 | 849 | 850 | 851 | 852 | # In[ ]: 853 | 854 | 855 | 856 | 857 | 858 | # In[ ]: 859 | 860 | 861 | 862 | 863 | 864 | # In[ ]: 865 | 866 | 867 | 868 | 869 | 870 | # In[ ]: 871 | 872 | 873 | 874 | 875 | -------------------------------------------------------------------------------- /EDA/Family_support_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Family_support_plot.png -------------------------------------------------------------------------------- /EDA/Going_out_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Going_out_plot.png -------------------------------------------------------------------------------- /EDA/Grade_Age.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_Age.png -------------------------------------------------------------------------------- /EDA/Grade_Failure_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_Failure_status.png -------------------------------------------------------------------------------- /EDA/Grade_Parental_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_Parental_status.png -------------------------------------------------------------------------------- /EDA/Grade_Relationshipstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_Relationshipstatus.png -------------------------------------------------------------------------------- /EDA/Grade_family support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_family support.png -------------------------------------------------------------------------------- /EDA/Grade_fathers_edu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_fathers_edu.png -------------------------------------------------------------------------------- /EDA/Grade_fathers_job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_fathers_job.png -------------------------------------------------------------------------------- /EDA/Grade_freetime_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_freetime_status.png -------------------------------------------------------------------------------- /EDA/Grade_gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_gender.png -------------------------------------------------------------------------------- /EDA/Grade_going_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_going_out.png -------------------------------------------------------------------------------- /EDA/Grade_internet_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_internet_status.png -------------------------------------------------------------------------------- /EDA/Grade_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_location.png -------------------------------------------------------------------------------- /EDA/Grade_mhigher_education_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_mhigher_education_status.png -------------------------------------------------------------------------------- /EDA/Grade_mothers_edu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_mothers_edu.png -------------------------------------------------------------------------------- /EDA/Grade_mothers_fathers_edu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_mothers_fathers_edu.png -------------------------------------------------------------------------------- /EDA/Grade_mothers_fathers_job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_mothers_fathers_job.png -------------------------------------------------------------------------------- /EDA/Grade_mothers_job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_mothers_job.png -------------------------------------------------------------------------------- /EDA/Grade_overall_health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_overall_health.png -------------------------------------------------------------------------------- /EDA/Grade_regularity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_regularity.png -------------------------------------------------------------------------------- /EDA/Grade_study_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_study_time.png -------------------------------------------------------------------------------- /EDA/Grade_weekend_alchol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_weekend_alchol.png -------------------------------------------------------------------------------- /EDA/Grade_workday_alchol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Grade_workday_alchol.png -------------------------------------------------------------------------------- /EDA/Guardian_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Guardian_plot.png -------------------------------------------------------------------------------- /EDA/Parent_Education_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Parent_Education_plot.png -------------------------------------------------------------------------------- /EDA/Parent_Job_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Parent_Job_plot.png -------------------------------------------------------------------------------- /EDA/Pstatus_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Pstatus_plot.png -------------------------------------------------------------------------------- /EDA/Reason_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Reason_plot.png -------------------------------------------------------------------------------- /EDA/Study_time_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/Study_time_plot.png -------------------------------------------------------------------------------- /EDA/address_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/address_plot.png -------------------------------------------------------------------------------- /EDA/age_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/age_plot.png -------------------------------------------------------------------------------- /EDA/alcohol_consumption_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/alcohol_consumption_plot.png -------------------------------------------------------------------------------- /EDA/attend_nursery_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/attend_nursery_plot.png -------------------------------------------------------------------------------- /EDA/extracurricular_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/extracurricular_plot.png -------------------------------------------------------------------------------- /EDA/failures_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/failures_plot.png -------------------------------------------------------------------------------- /EDA/fam_relationship_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/fam_relationship_plot.png -------------------------------------------------------------------------------- /EDA/family_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/family_plot.png -------------------------------------------------------------------------------- /EDA/free_time_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/free_time_plot.png -------------------------------------------------------------------------------- /EDA/gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/gender.png -------------------------------------------------------------------------------- /EDA/higher_education_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/higher_education_plot.png -------------------------------------------------------------------------------- /EDA/internet_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/internet_plot.png -------------------------------------------------------------------------------- /EDA/paid_claases_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/paid_claases_plot.png -------------------------------------------------------------------------------- /EDA/rom_relationship_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/rom_relationship_plot.png -------------------------------------------------------------------------------- /EDA/school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/school.png -------------------------------------------------------------------------------- /EDA/school_support_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/school_support_plot.png -------------------------------------------------------------------------------- /EDA/travel_time_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/EDA/travel_time_plot.png -------------------------------------------------------------------------------- /Evaluation.txt: -------------------------------------------------------------------------------- 1 | F-measure; 2 | Confusion matrix; 3 | True/False Positives (TP) and (FP); 4 | True/False Negatives (TN) and (FN); 5 | Precision; 6 | Accuracy; 7 | Specificity; 8 | Sensitivity; 9 | ROC; 10 | Recall score; 11 | Classification Report; -------------------------------------------------------------------------------- /Family_support_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Family_support_plot.png -------------------------------------------------------------------------------- /Feature_Engineering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Feature_Engineering.png -------------------------------------------------------------------------------- /Going_out_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Going_out_plot.png -------------------------------------------------------------------------------- /Grade_Parental_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_Parental_status.png -------------------------------------------------------------------------------- /Grade_Relationshipstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_Relationshipstatus.png -------------------------------------------------------------------------------- /Grade_fathers_edu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_fathers_edu.png -------------------------------------------------------------------------------- /Grade_fathers_job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_fathers_job.png -------------------------------------------------------------------------------- /Grade_gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_gender.png -------------------------------------------------------------------------------- /Grade_going_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_going_out.png -------------------------------------------------------------------------------- /Grade_internet_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_internet_status.png -------------------------------------------------------------------------------- /Grade_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_location.png -------------------------------------------------------------------------------- /Grade_mhigher_education_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_mhigher_education_status.png -------------------------------------------------------------------------------- /Grade_mothers_edu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_mothers_edu.png -------------------------------------------------------------------------------- /Grade_mothers_job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_mothers_job.png -------------------------------------------------------------------------------- /Grade_overall_health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_overall_health.png -------------------------------------------------------------------------------- /Grade_regularity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_regularity.png -------------------------------------------------------------------------------- /Grade_study_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_study_time.png -------------------------------------------------------------------------------- /Grade_weekend_alchol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_weekend_alchol.png -------------------------------------------------------------------------------- /Grade_workday_alchol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Grade_workday_alchol.png -------------------------------------------------------------------------------- /Guardian_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Guardian_plot.png -------------------------------------------------------------------------------- /ML PROJECT REPORT (2).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/ML PROJECT REPORT (2).pdf -------------------------------------------------------------------------------- /Model.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import pandas as pd\n", 11 | "import sklearn\n", 12 | "from sklearn import preprocessing\n", 13 | "from matplotlib import pyplot as plt\n", 14 | "from sklearn.model_selection import train_test_split\n", 15 | "from sklearn.linear_model import LogisticRegression\n", 16 | "from sklearn.metrics import mean_squared_error\n", 17 | "from sklearn.metrics import log_loss,roc_auc_score,accuracy_score,confusion_matrix\n", 18 | "import seaborn as sns \n", 19 | "from sklearn.ensemble import RandomForestClassifier\n", 20 | "from sklearn.svm import SVC\n", 21 | "from sklearn.tree import DecisionTreeClassifier\n", 22 | "from sklearn.ensemble import AdaBoostClassifier\n", 23 | "from itertools import cycle\n", 24 | "from sklearn import svm, datasets\n", 25 | "from sklearn.metrics import roc_curve, auc\n", 26 | "from sklearn.preprocessing import label_binarize\n", 27 | "from sklearn.multiclass import OneVsRestClassifier\n", 28 | "from scipy import interp" 29 | ] 30 | }, 31 | { 32 | "cell_type": "code", 33 | "execution_count": null, 34 | "metadata": {}, 35 | "outputs": [], 36 | "source": [] 37 | } 38 | ], 39 | "metadata": { 40 | "kernelspec": { 41 | "display_name": "Python 3", 42 | "language": "python", 43 | "name": "python3" 44 | }, 45 | "language_info": { 46 | "codemirror_mode": { 47 | "name": "ipython", 48 | "version": 3 49 | }, 50 | "file_extension": ".py", 51 | "mimetype": "text/x-python", 52 | "name": "python", 53 | "nbconvert_exporter": "python", 54 | "pygments_lexer": "ipython3", 55 | "version": "3.6.6" 56 | } 57 | }, 58 | "nbformat": 4, 59 | "nbformat_minor": 2 60 | } 61 | -------------------------------------------------------------------------------- /Model_prediction.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Student Performance Analysis Model 5 | 6 | # # Attributes 7 | # 8 | # 1 school - student's school (binary: 'GP' - Gabriel Pereira or 'MS' - Mousinho da Silveira) 9 | # 10 | # 2 sex - student's sex (binary: 'F' - female or 'M' - male) 11 | # 12 | # 3 age - student's age (numeric: from 15 to 22) 13 | # 14 | # 4 address - student's home address type (binary: 'U' - urban or 'R' - rural) 15 | # 16 | # 5 famsize - family size (binary: 'LE3' - less or equal to 3 or 'GT3' - greater than 3) 17 | # 18 | # 6 Pstatus - parent's cohabitation status (binary: 'T' - living together or 'A' - apart) 19 | # 20 | # 7 Medu - mother's education (numeric: 0 - none, 1 - primary education (4th grade), 2 – 5th to 9th grade, 3 – secondary education or 4 – higher education) 21 | # 22 | # 8 Fedu - father's education (numeric: 0 - none, 1 - primary education (4th grade), 2 – 5th to 9th grade, 3 – secondary education or 4 – higher education) 23 | # 24 | # 9 Mjob - mother's job (nominal: 'teacher', 'health' care related, civil 'services' (e.g. administrative or police), 'at_home' or 'other') 25 | # 26 | # 10 Fjob - father's job (nominal: 'teacher', 'health' care related, civil 'services' (e.g. administrative or police), 'at_home' or 'other') 27 | # 28 | # 11 reason - reason to choose this school (nominal: close to 'home', school 'reputation', 'course' preference or 'other') 29 | # 12 guardian - student's guardian (nominal: 'mother', 'father' or 'other') 30 | # 31 | # 13 traveltime - home to school travel time (numeric: 1 - <15 min., 2 - 15 to 30 min., 3 - 30 min. to 1 hour, or 4 - >1 hour) 32 | # 33 | # 14 studytime - weekly study time (numeric: 1 - <2 hours, 2 - 2 to 5 hours, 3 - 5 to 10 hours, or 4 - >10 hours) 34 | # 35 | # 15 failures - number of past class failures (numeric: n if 1<=n<3, else 4) 36 | # 37 | # 16 schoolsup - extra educational support (binary: yes or no) 38 | # 39 | # 17 famsup - family educational support (binary: yes or no) 40 | # 41 | # 18 paid - extra paid classes within the course subject (Math or Portuguese) (binary: yes or no) 42 | # 43 | # 19 activities - extra-curricular activities (binary: yes or no) 44 | # 45 | # 20 nursery - attended nursery school (binary: yes or no) 46 | # 47 | # 21 higher - wants to take higher education (binary: yes or no) 48 | # 49 | # 22 internet - Internet access at home (binary: yes or no) 50 | # 51 | # 23 romantic - with a romantic relationship (binary: yes or no) 52 | # 53 | # 24 famrel - quality of family relationships (numeric: from 1 - very bad to 5 - excellent) 54 | # 55 | # 25 freetime - free time after school (numeric: from 1 - very low to 5 - very high) 56 | # 57 | # 26 goout - going out with friends (numeric: from 1 - very low to 5 - very high) 58 | # 59 | # 27 Dalc - workday alcohol consumption (numeric: from 1 - very low to 5 - very high) 60 | # 61 | # 28 Walc - weekend alcohol consumption (numeric: from 1 - very low to 5 - very high) 62 | # 63 | # 29 health - current health status (numeric: from 1 - very bad to 5 - very good) 64 | # 65 | # 30 absences - number of school absences (numeric: from 0 to 93) 66 | # 67 | # 68 | # # Grades 69 | # 70 | # 31 G1 - first period grade (numeric: from 0 to 20) 71 | # 72 | # 31 G2 - second period grade (numeric: from 0 to 20) 73 | # 74 | # 32 G3 - final grade (numeric: from 0 to 20, output target) 75 | # 76 | 77 | # In[291]: 78 | 79 | 80 | import numpy as np 81 | import pandas as pd 82 | from matplotlib import pyplot as plt 83 | import seaborn as sns 84 | import sklearn 85 | from sklearn import preprocessing 86 | from sklearn.model_selection import train_test_split 87 | from sklearn.linear_model import LogisticRegression 88 | from sklearn.metrics import mean_squared_error 89 | from sklearn.metrics import log_loss,roc_auc_score,accuracy_score,confusion_matrix 90 | from sklearn.ensemble import RandomForestClassifier 91 | from sklearn.model_selection import KFold 92 | from sklearn.model_selection import cross_val_score 93 | from sklearn.svm import SVC 94 | from sklearn.tree import DecisionTreeClassifier 95 | from sklearn.ensemble import AdaBoostClassifier 96 | from sklearn import svm, datasets 97 | from sklearn.metrics import roc_curve, auc 98 | from sklearn.preprocessing import label_binarize 99 | from sklearn.multiclass import OneVsRestClassifier 100 | from scipy import interp 101 | from sklearn.metrics import f1_score, recall_score, classification_report 102 | from sklearn.metrics import fbeta_score 103 | from sklearn.datasets import make_classification 104 | from sklearn.ensemble import ExtraTreesClassifier 105 | from xgboost import XGBClassifier 106 | from xgboost import plot_importance 107 | from itertools import cycle 108 | import pickle 109 | 110 | 111 | # In[292]: 112 | 113 | 114 | train1 = pd.read_csv('input/features.csv') 115 | train1.head() 116 | 117 | 118 | # # Correlation Plot 119 | 120 | # In[293]: 121 | 122 | 123 | def correlation(df): 124 | corr = df.corr() 125 | fig, ax = plt.subplots(figsize=(20, 15)) 126 | colormap = sns.diverging_palette(220, 10, as_cmap=True) 127 | sns.heatmap(corr, cmap=colormap, annot=True, fmt=".2f") 128 | plt.xticks(range(len(corr.columns)), corr.columns); 129 | plt.yticks(range(len(corr.columns)), corr.columns) 130 | plt.savefig('Correlation.png', bbox_inches='tight') 131 | plt.show() 132 | 133 | 134 | # In[294]: 135 | 136 | 137 | correlation(train1) 138 | 139 | 140 | # In[295]: 141 | 142 | 143 | from pandas.plotting import scatter_matrix 144 | grades = train1[['G1','G2','G3']] 145 | scatter_matrix(grades) 146 | plt.savefig('grades.png', bbox_inches='tight') 147 | plt.show() 148 | 149 | 150 | # # One Hot Encoding on Final Grade 151 | 152 | # In[296]: 153 | 154 | 155 | le=preprocessing.LabelEncoder() 156 | 157 | 158 | # In[297]: 159 | 160 | 161 | le.fit(train1['FinalGrade']) 162 | train1['FinalGrade']=le.transform(train1['FinalGrade']) 163 | y=train1['FinalGrade'] 164 | # train1 = train1.drop(labels=['Regularity','Grade1','Grade2'],axis=1) 165 | 166 | 167 | # In[298]: 168 | 169 | 170 | train1 = pd.get_dummies(train1) 171 | 172 | 173 | # In[299]: 174 | 175 | 176 | train1.head(10) 177 | 178 | 179 | # # Feature Drop 180 | 181 | # In[300]: 182 | 183 | 184 | # y=train1.FinalGrade 185 | train1 = train1.drop(labels=['G3','FinalGrade','Fjob_at_home','Fjob_teacher','Pstatus_A','Pstatus_T'],axis=1) 186 | train1.head() 187 | 188 | 189 | # # SPLIT DATA 190 | 191 | # In[301]: 192 | 193 | 194 | x_train,x_val,y_train,y_val = train_test_split(train1,y,random_state=0) 195 | print(x_train.shape) 196 | print(y_train.shape) 197 | print(x_val.shape) 198 | print(y_val.shape) 199 | 200 | 201 | # # Confusion Matrix 202 | 203 | # In[302]: 204 | 205 | 206 | def confusionmatrix(y_val,y_pred): 207 | labels = list(range(0,5)) 208 | cm=confusion_matrix(y_val,y_pred) 209 | a4_dims = (11.7, 8.27) 210 | fig, ax = plt.subplots(figsize=a4_dims) 211 | ax= plt.subplot() 212 | sns.heatmap(cm, annot=True, ax = ax); #annot=True to annotate cells 213 | # labels, title and ticks 214 | ax.set_xlabel('Predicted labels'); 215 | ax.set_ylabel('True labels'); 216 | ax.set_title('Confusion Matrix'); 217 | ax.xaxis.set_ticklabels(labels); 218 | ax.yaxis.set_ticklabels(labels); 219 | plt.savefig('confusion_matrix.png', bbox_inches='tight') 220 | 221 | FP = cm.sum(axis=0) - np.diag(cm) 222 | FN = cm.sum(axis=1) - np.diag(cm) 223 | TP = np.diag(cm) 224 | TN = cm.sum() - (FP + FN + TP) 225 | 226 | total = lambda x : x.sum()/5 227 | # Sensitivity, hit rate, recall, or true positive rate 228 | TPR = TP/(TP+FN) 229 | print('percentage of sensitivity = '+str(total(TPR)*100)) 230 | 231 | # Specificity or true negative rate 232 | TNR = TN/(TN+FP) 233 | 234 | # Precision or positive predictive value 235 | PPV = TP/(TP+FP) 236 | print('percentage of precision = '+str(total(PPV)*100)) 237 | # Negative predictive value 238 | NPV = TN/(TN+FN) 239 | 240 | # Fall out or false positive rate 241 | FPR = FP/(FP+TN) 242 | 243 | # False negative rate 244 | FNR = FN/(TP+FN) 245 | 246 | # False discovery rate 247 | FDR = FP/(TP+FP) 248 | 249 | # Overall accuracy 250 | ACC = (TP+TN)/(TP+FP+FN+TN) 251 | print('Accuracy percentage = '+str(total(ACC)*100)) 252 | 253 | 254 | # # ROC plot 255 | 256 | # In[303]: 257 | 258 | 259 | def ROC_plot(x_train,x_val,model): 260 | train = pd.read_csv('features.csv') 261 | train.head() 262 | y=train[['FinalGrade']] 263 | train = train.drop(['G3'],axis=1); 264 | train = train.drop(['FinalGrade'],axis=1); 265 | train = train.drop(['G2'],axis=1); 266 | train = train.drop(['G1'],axis=1); 267 | y = label_binarize(y, classes=['Failure','Poor','Satisfactory','Good','Excellent']) 268 | n_classes = y.shape[1] 269 | 270 | X_train, X_test, y_train, y_test = train_test_split(train,y,random_state=0) 271 | 272 | classifier = OneVsRestClassifier(model) 273 | y_score = classifier.fit(x_train, y_train).decision_function(x_val) 274 | y_score.shape 275 | 276 | fpr = dict() 277 | tpr = dict() 278 | roc_auc = dict() 279 | for i in range(n_classes): 280 | fpr[i], tpr[i], _ = roc_curve(y_test[:,i], y_score[:,i]) 281 | roc_auc[i] = auc(fpr[i], tpr[i]) 282 | 283 | # Compute micro-average ROC curve and ROC area 284 | fpr["micro"], tpr["micro"], _ = roc_curve(y_test.ravel(), y_score.ravel()) 285 | roc_auc["micro"] = auc(fpr["micro"], tpr["micro"]) 286 | 287 | 288 | # Individual ROC 289 | plt.figure() 290 | lw = 2 291 | for i in (0,1): 292 | plt.subplot(1,2,i+1) 293 | plt.plot(fpr[i], tpr[i], color='darkorange', 294 | lw=lw, label='ROC curve (area = %0.2f)' % roc_auc[i]) 295 | plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--') 296 | plt.xlim([0.0, 1.0]) 297 | plt.ylim([0.0, 1.05]) 298 | plt.xlabel('False Positive Rate') 299 | plt.ylabel('True Positive Rate') 300 | plt.title('Receiver operating characteristic label'+str(i)) 301 | plt.legend(loc="lower right") 302 | plt.savefig('ROC1.png', bbox_inches='tight') 303 | plt.plot() 304 | 305 | plt.figure() 306 | lw = 2 307 | for i in (2,3): 308 | plt.subplot(1,2,i-1) 309 | plt.plot(fpr[i], tpr[i], color='red', 310 | lw=lw, label='ROC curve (area = %0.2f)' % roc_auc[i]) 311 | plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--') 312 | plt.xlim([0.0, 1.0]) 313 | plt.ylim([0.0, 1.05]) 314 | plt.xlabel('False Positive Rate') 315 | plt.ylabel('True Positive Rate') 316 | plt.title('Receiver operating characteristic label'+str(i)) 317 | plt.legend(loc="lower right") 318 | plt.savefig('ROC2.png', bbox_inches='tight') 319 | plt.plot() 320 | 321 | plt.figure() 322 | lw = 2 323 | plt.subplot(1,2,1) 324 | plt.plot(fpr[4], tpr[4], color='grey', 325 | lw=lw, label='ROC curve (area = %0.2f)' % roc_auc[4]) 326 | plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--') 327 | plt.xlim([0.0, 1.0]) 328 | plt.ylim([0.0, 1.05]) 329 | plt.xlabel('False Positive Rate') 330 | plt.ylabel('True Positive Rate') 331 | plt.title('Receiver operating characteristic label'+str(4)) 332 | plt.legend(loc="lower right") 333 | plt.savefig('ROC3',box_inches='tight') 334 | plt.plot() 335 | 336 | 337 | # Combined ROC 338 | 339 | # Compute macro-average ROC curve and ROC area 340 | 341 | # First aggregate all false positive rates 342 | all_fpr = np.unique(np.concatenate([fpr[i] for i in range(n_classes)])) 343 | 344 | # Then interpolate all ROC curves at this points 345 | mean_tpr = np.zeros_like(all_fpr) 346 | for i in range(n_classes): 347 | mean_tpr += interp(all_fpr, fpr[i], tpr[i]) 348 | 349 | # Finally average it and compute AUC 350 | mean_tpr /= n_classes 351 | 352 | fpr["macro"] = all_fpr 353 | tpr["macro"] = mean_tpr 354 | roc_auc["macro"] = auc(fpr["macro"], tpr["macro"]) 355 | 356 | # Plot all ROC curves 357 | plt.figure() 358 | plt.plot(fpr["micro"], tpr["micro"], 359 | label='micro-average ROC curve (area = {0:0.2f})' 360 | ''.format(roc_auc["micro"]), 361 | color='deeppink', linestyle=':', linewidth=4) 362 | 363 | plt.plot(fpr["macro"], tpr["macro"], 364 | label='macro-average ROC curve (area = {0:0.2f})' 365 | ''.format(roc_auc["macro"]), 366 | color='navy', linestyle=':', linewidth=4) 367 | 368 | for i in range(n_classes): 369 | plt.plot(fpr[i], tpr[i], lw=2, 370 | label='ROC curve of class {0} (area = {1:0.2f})' 371 | ''.format(i, roc_auc[i])) 372 | print('Area Under the Curve with label '+str(i)+' is '+str(roc_auc[i])) 373 | plt.savefig('ROC4', bbox_inches='tight') 374 | plt.plot([0, 1], [0, 1], 'k--', lw=2) 375 | plt.xlim([0.0, 1.0]) 376 | plt.ylim([0.0, 1.05]) 377 | plt.xlabel('False Positive Rate') 378 | plt.ylabel('True Positive Rate') 379 | plt.title('Some extension of Receiver operating characteristic to multi-class') 380 | plt.legend(loc="lower right") 381 | plt.rcParams["figure.figsize"] = (10,6) 382 | 383 | 384 | # # Fscore 385 | 386 | # In[304]: 387 | 388 | 389 | def Fscore(y_val,y_pred): 390 | print('f score = ' + str(f1_score(y_val, y_pred, average="macro"))) 391 | 392 | 393 | # # Recall 394 | 395 | # In[305]: 396 | 397 | 398 | def recall(y_val,y_pred): 399 | print('percentage of recall score = '+str(recall_score(y_val, y_pred, average="macro"))) 400 | 401 | 402 | # # Classification Report 403 | 404 | # In[306]: 405 | 406 | 407 | def report(y_val,y_pred): 408 | target_names = ['Failure','Poor','Satisfactory','Good','Excellent'] 409 | print('Classification Report') 410 | print(classification_report(y_val, y_pred, target_names=target_names)) 411 | 412 | 413 | # # F Beta score 414 | 415 | # In[307]: 416 | 417 | 418 | def fbeta(y_val,y_pred): 419 | print('Fbeta score = ' + str(fbeta_score(y_val,y_pred,average='macro', beta=0.5))) 420 | 421 | 422 | # # LOGISTIC REGRESSION 423 | 424 | # In[308]: 425 | 426 | 427 | def logistic_regression_model(x_train,y_train,x_val,y_val): 428 | lr = LogisticRegression() 429 | lr.fit(x_train,y_train) 430 | y_pred = lr.predict(x_val) 431 | y_predict = lr.predict_proba(x_val) 432 | print("Log_Loss: ",log_loss(y_val,y_predict)) 433 | print("Accuracy_Score: ",accuracy_score(y_val,y_pred)) 434 | confusionmatrix(y_val,y_pred) 435 | Fscore(y_val,y_pred) 436 | recall(y_val,y_pred) 437 | report(y_val,y_pred) 438 | fbeta(y_val,y_pred) 439 | return lr 440 | 441 | 442 | # In[309]: 443 | 444 | 445 | model =logistic_regression_model(x_train,y_train,x_val,y_val) 446 | ROC_plot(x_train,x_val,model) 447 | 448 | 449 | # In[310]: 450 | 451 | 452 | filename = 'pickle/model_lr.pkl' 453 | outfile = open(filename,'wb') 454 | pickle.dump(model,outfile) 455 | outfile.close() 456 | 457 | 458 | # # RANDOM FOREST 459 | 460 | # In[311]: 461 | 462 | 463 | def random_forest_model(x_train,y_train,x_val,y_val): 464 | random_forest = RandomForestClassifier(n_estimators=28,max_depth=5,random_state=0) 465 | 466 | forest = random_forest.fit(x_train, y_train) 467 | print("Random Forest Train data Score" , ":" , forest.score(x_train, y_train) 468 | , "," ,"Validation data Score" ,":" , forest.score(x_val, y_val)) 469 | Y_pred = random_forest.predict_proba(x_val) 470 | Y_pred1 = random_forest.predict(x_val) 471 | print("Log_Loss: ",log_loss(y_val,Y_pred)) 472 | confusionmatrix(y_val,Y_pred1) 473 | Fscore(y_val,Y_pred1) 474 | recall(y_val,Y_pred1) 475 | report(y_val,Y_pred1) 476 | fbeta(y_val,Y_pred1) 477 | return forest 478 | 479 | 480 | # In[312]: 481 | 482 | 483 | model = random_forest_model(x_train,y_train,x_val,y_val) 484 | 485 | 486 | # In[313]: 487 | 488 | 489 | filename = 'pickle/model_rf.pkl' 490 | outfile = open(filename,'wb') 491 | pickle.dump(model,outfile) 492 | outfile.close() 493 | 494 | 495 | # # SVM 496 | 497 | # In[314]: 498 | 499 | 500 | def SVM_Model(X_train,Y_train,X_test,y_val): 501 | svc = SVC() 502 | svc.fit(X_train, Y_train) 503 | Y_pred = svc.predict(X_test) 504 | print("SVM Train data Score" , ":" , svc.score(X_train, y_train) 505 | , "," ,"Validation data Score" ,":" , svc.score(X_test, y_val)) 506 | confusionmatrix(y_val,Y_pred) 507 | Fscore(y_val,Y_pred) 508 | recall(y_val,Y_pred) 509 | report(y_val,Y_pred) 510 | fbeta(y_val,Y_pred) 511 | return svc 512 | 513 | 514 | # In[315]: 515 | 516 | 517 | model = SVM_Model(x_train,y_train,x_val,y_val) 518 | ROC_plot(x_train,x_val,model) 519 | 520 | 521 | # In[316]: 522 | 523 | 524 | filename = 'pickle/model_svm.pkl' 525 | outfile = open(filename,'wb') 526 | pickle.dump(model,outfile) 527 | outfile.close() 528 | 529 | 530 | # # DECISION TREE 531 | 532 | # In[317]: 533 | 534 | 535 | def Decison_tree_Model(x_train,y_train,x_val,y_val): 536 | tree = DecisionTreeClassifier(min_samples_leaf=9,random_state=0) 537 | tf= tree.fit(x_train, y_train) 538 | y_pred = tf.predict(x_val) 539 | y_predict = tf.predict_proba(x_val) 540 | print("Decisioin Tree Train data Score" , ":" , tf.score(x_train, y_train) 541 | , "," , "Validation data Score" ,":" , tf.score(x_val, y_val)) 542 | confusionmatrix(y_val,y_pred) 543 | print("Log_Loss: ",log_loss(y_val,y_predict)) 544 | Fscore(y_val,y_pred) 545 | recall(y_val,y_pred) 546 | report(y_val,y_pred) 547 | fbeta(y_val,y_pred) 548 | return tree 549 | 550 | 551 | # In[318]: 552 | 553 | 554 | model = Decison_tree_Model(x_train,y_train,x_val,y_val) 555 | 556 | 557 | # In[319]: 558 | 559 | 560 | filename = 'pickle/model_dt.pkl' 561 | outfile = open(filename,'wb') 562 | pickle.dump(model,outfile) 563 | outfile.close() 564 | 565 | 566 | # # ADA BOOST 567 | 568 | # In[320]: 569 | 570 | 571 | def ada_boost_model(x_train,y_train,x_val,y_val): 572 | ada = AdaBoostClassifier(n_estimators=2) 573 | af = ada.fit(x_train, y_train) 574 | y_pred = af.predict(x_val) 575 | y_predict = af.predict_proba(x_val) 576 | print("Ada Boost Train data Score" , ":" , af.score(x_train, y_train) 577 | , "," ,"Validation data Score" ,":" , af.score(x_val, y_val)) 578 | print("Log_Loss: ",log_loss(y_val,y_predict)) 579 | confusionmatrix(y_val,y_pred) 580 | Fscore(y_val,y_pred) 581 | recall(y_val,y_pred) 582 | report(y_val,y_pred) 583 | fbeta(y_val,y_pred) 584 | return ada 585 | 586 | 587 | # In[321]: 588 | 589 | 590 | model = ada_boost_model(x_train,y_train,x_val,y_val) 591 | ROC_plot(x_train,x_val,model) 592 | 593 | 594 | # In[322]: 595 | 596 | 597 | filename = 'pickle/model_ada.pkl' 598 | outfile = open(filename,'wb') 599 | pickle.dump(model,outfile) 600 | outfile.close() 601 | 602 | 603 | # # XGBOOST 604 | 605 | # In[323]: 606 | 607 | 608 | def XGBoost(x_train,y_train,x_val,y_val): 609 | model = XGBClassifier() 610 | model = XGBClassifier(learning_rate=0.1,n_estimators=80) 611 | mf = model.fit(x_train,y_train) 612 | y_pred=model.predict(x_val) 613 | y_predict = mf.predict_proba(x_val) 614 | print("XGBoost Train data Score" , ":" , mf.score(x_train, y_train) 615 | , "," ,"Validation data Score" ,":" , mf.score(x_val, y_val)) 616 | print("Log_Loss: ",log_loss(y_val,y_predict)) 617 | confusionmatrix(y_val,y_pred) 618 | Fscore(y_val,y_pred) 619 | recall(y_val,y_pred) 620 | report(y_val,y_pred) 621 | fbeta(y_val,y_pred) 622 | 623 | 624 | # plot feature importance 625 | fig, ax = plt.subplots(figsize=(10, 20)) 626 | plot_importance(model, ax=ax) 627 | plt.savefig('Feature_Engineering.png', bbox_inches='tight') 628 | plt.show() 629 | return model 630 | 631 | 632 | 633 | 634 | # In[324]: 635 | 636 | 637 | model = XGBoost(x_train,y_train,x_val,y_val) 638 | 639 | 640 | # # K Cross Validations 641 | 642 | # In[325]: 643 | 644 | 645 | def k_cross_validations(x_train,y_train,): 646 | X = x_train 647 | y = y_train 648 | kf = KFold(n_splits=10) # Define the split - into 2 folds 649 | kf.get_n_splits(X) # returns the number of splitting iterations in the cross-validator 650 | print(kf) 651 | KFold(n_splits=10, random_state=None, shuffle=False) 652 | return kf 653 | 654 | 655 | # In[326]: 656 | 657 | 658 | kf = k_cross_validations(x_train,y_train) 659 | classifier = model 660 | cross_val_score(classifier,x_train, y_train, cv=kf, n_jobs=1) 661 | 662 | 663 | # In[327]: 664 | 665 | 666 | def FeatureImportance(): 667 | # Build a classification task using 3 informative features 668 | X, y = make_classification(n_samples=1000, 669 | n_features=10, 670 | n_informative=3, 671 | n_redundant=0, 672 | n_repeated=0, 673 | n_classes=2, 674 | random_state=0, 675 | shuffle=False) 676 | 677 | # Build a forest and compute the feature importances 678 | forest = ExtraTreesClassifier(n_estimators=250,random_state=0) 679 | 680 | forest.fit(X, y) 681 | importances = forest.feature_importances_ 682 | std = np.std([tree.feature_importances_ for tree in forest.estimators_], 683 | axis=0) 684 | indices = np.argsort(importances)[::-1] 685 | 686 | # Print the feature ranking 687 | print("Feature ranking:") 688 | 689 | for f in range(X.shape[1]): 690 | print("%d. feature %d (%f)" % (f + 1, indices[f], importances[indices[f]])) 691 | 692 | # Plot the feature importances of the forest 693 | plt.figure() 694 | plt.title("Feature importances") 695 | plt.bar(range(X.shape[1]), importances[indices], 696 | color="r", yerr=std[indices], align="center") 697 | plt.xticks(range(X.shape[1]), indices) 698 | plt.xlim([-1, X.shape[1]]) 699 | plt.show() 700 | 701 | 702 | # In[328]: 703 | 704 | 705 | FeatureImportance() 706 | 707 | 708 | # # Finally we choose XGBoost Model 709 | # 710 | # # Train data Score : 0.9386973180076629 711 | # 712 | # # Validation data Score : 0.8850574712643678 713 | 714 | # In[329]: 715 | 716 | 717 | filename = 'pickle/model_xgb.pkl' 718 | outfile = open(filename,'wb') 719 | pickle.dump(model,outfile) 720 | outfile.close() 721 | 722 | 723 | # In[ ]: 724 | 725 | 726 | 727 | 728 | -------------------------------------------------------------------------------- /PROJECT REPORT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/PROJECT REPORT.pdf -------------------------------------------------------------------------------- /Parent_Education_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Parent_Education_plot.png -------------------------------------------------------------------------------- /Parent_Job_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Parent_Job_plot.png -------------------------------------------------------------------------------- /Pstatus_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Pstatus_plot.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Student-Performance-Prediction 2 | 3 | Data Set from 4 | http://archive.ics.uci.edu/ml/datasets/Student+Performance# 5 | 6 | Data Set Information: 7 | 8 | This data approach student achievement in secondary education of two Portuguese schools. 9 | The data attributes include student grades, demographic, social and school related features) and it was collected by using school reports and questionnaires. 10 | Two datasets are provided regarding the performance in two distinct subjects: Mathematics (mat) and Portuguese language (por). In [Cortez and Silva, 2008], the two datasets were modeled under binary/five-level classification and regression tasks. 11 | Important note: the target attribute G3 has a strong correlation with attributes G2 and G1. This occurs because G3 is the final year grade (issued at the 3rd period), while G1 and G2 correspond to the 1st and 2nd period grades. It is more difficult to predict G3 without G2 and G1, but such prediction is much more useful (see paper source for more details). 12 | 13 | 14 | # Attributes 15 | 1 school - student's school (binary: 'GP' - Gabriel Pereira or 'MS' - Mousinho da Silveira) 16 | 17 | 2 sex - student's sex (binary: 'F' - female or 'M' - male) 18 | 19 | 3 age - student's age (numeric: from 15 to 22) 20 | 21 | 4 address - student's home address type (binary: 'U' - urban or 'R' - rural) 22 | 23 | 5 famsize - family size (binary: 'LE3' - less or equal to 3 or 'GT3' - greater than 3) 24 | 25 | 6 Pstatus - parent's cohabitation status (binary: 'T' - living together or 'A' - apart) 26 | 27 | 7 Medu - mother's education (numeric: 0 - none, 1 - primary education (4th grade), 2 – 5th to 9th grade, 3 – secondary education or 4 – higher education) 28 | 29 | 8 Fedu - father's education (numeric: 0 - none, 1 - primary education (4th grade), 2 – 5th to 9th grade, 3 – secondary education or 4 – higher education) 30 | 31 | 9 Mjob - mother's job (nominal: 'teacher', 'health' care related, civil 'services' (e.g. administrative or police), 'at_home' or 'other') 32 | 33 | 10 Fjob - father's job (nominal: 'teacher', 'health' care related, civil 'services' (e.g. administrative or police), 'at_home' or 'other') 34 | 35 | 11 reason - reason to choose this school (nominal: close to 'home', school 'reputation', 'course' preference or 'other') 36 | 37 | 12 guardian - student's guardian (nominal: 'mother', 'father' or 'other') 38 | 39 | 13 traveltime - home to school travel time (numeric: 1 - <15 min., 2 - 15 to 30 min., 3 - 30 min. to 1 hour, or 4 - >1 hour) 40 | 41 | 14 studytime - weekly study time (numeric: 1 - <2 hours, 2 - 2 to 5 hours, 3 - 5 to 10 hours, or 4 - >10 hours) 42 | 43 | 15 failures - number of past class failures (numeric: n if 1<=n<3, else 4) 44 | 45 | 16 schoolsup - extra educational support (binary: yes or no) 46 | 47 | 17 famsup - family educational support (binary: yes or no) 48 | 49 | 18 paid - extra paid classes within the course subject (Math or Portuguese) (binary: yes or no) 50 | 51 | 19 activities - extra-curricular activities (binary: yes or no) 52 | 53 | 20 nursery - attended nursery school (binary: yes or no) 54 | 55 | 21 higher - wants to take higher education (binary: yes or no) 56 | 57 | 22 internet - Internet access at home (binary: yes or no) 58 | 59 | 23 romantic - with a romantic relationship (binary: yes or no) 60 | 61 | 24 famrel - quality of family relationships (numeric: from 1 - very bad to 5 - excellent) 62 | 63 | 25 freetime - free time after school (numeric: from 1 - very low to 5 - very high) 64 | 65 | 26 goout - going out with friends (numeric: from 1 - very low to 5 - very high) 66 | 67 | 27 Dalc - workday alcohol consumption (numeric: from 1 - very low to 5 - very high) 68 | 69 | 28 Walc - weekend alcohol consumption (numeric: from 1 - very low to 5 - very high) 70 | 71 | 29 health - current health status (numeric: from 1 - very bad to 5 - very good) 72 | 73 | 30 absences - number of school absences (numeric: from 0 to 93) 74 | 75 | 76 | # Grades 77 | 78 | 31 G1 - first period grade (numeric: from 0 to 20) 79 | 80 | 31 G2 - second period grade (numeric: from 0 to 20) 81 | 82 | 32 G3 - final grade (numeric: from 0 to 20, output target) 83 | 84 | # Correlation Plot 85 | 86 | ![Alt Text](https://github.com/RohithYogi/Student-Performance-Prediction/blob/master/Correlation.png) 87 | -------------------------------------------------------------------------------- /ROC1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/ROC1.png -------------------------------------------------------------------------------- /ROC2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/ROC2.png -------------------------------------------------------------------------------- /ROC3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/ROC3.png -------------------------------------------------------------------------------- /ROC4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/ROC4.png -------------------------------------------------------------------------------- /Reason_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Reason_plot.png -------------------------------------------------------------------------------- /STUDENT_GRADE.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 29, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import pandas as pd\n", 11 | "import sklearn\n", 12 | "from sklearn import preprocessing" 13 | ] 14 | }, 15 | { 16 | "cell_type": "code", 17 | "execution_count": 30, 18 | "metadata": {}, 19 | "outputs": [], 20 | "source": [ 21 | "train1 = pd.read_csv('student-mat.csv')" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": 31, 27 | "metadata": {}, 28 | "outputs": [], 29 | "source": [ 30 | "train2 = pd.read_csv('student-por.csv')" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": 32, 36 | "metadata": {}, 37 | "outputs": [ 38 | { 39 | "data": { 40 | "text/html": [ 41 | "
\n", 42 | "\n", 55 | "\n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | " \n", 98 | " \n", 99 | " \n", 100 | " \n", 101 | " \n", 102 | " \n", 103 | " \n", 104 | " \n", 105 | " \n", 106 | " \n", 107 | " \n", 108 | " \n", 109 | " \n", 110 | " \n", 111 | " \n", 112 | " \n", 113 | " \n", 114 | " \n", 115 | " \n", 116 | " \n", 117 | " \n", 118 | " \n", 119 | " \n", 120 | " \n", 121 | " \n", 122 | " \n", 123 | " \n", 124 | " \n", 125 | " \n", 126 | " \n", 127 | " \n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | "
schoolsexageaddressfamsizePstatusMeduFeduMjobFjob...famrelfreetimegooutDalcWalchealthabsencesG1G2G3
0GPF18UGT3A44at_hometeacher...4341136566
1GPF17UGT3T11at_homeother...5331134556
2GPF15ULE3T11at_homeother...432233107810
3GPF15UGT3T42healthservices...3221152151415
4GPF16UGT3T33otherother...432125461010
\n", 205 | "

5 rows × 33 columns

\n", 206 | "
" 207 | ], 208 | "text/plain": [ 209 | " school sex age address famsize Pstatus Medu Fedu Mjob Fjob ... \\\n", 210 | "0 GP F 18 U GT3 A 4 4 at_home teacher ... \n", 211 | "1 GP F 17 U GT3 T 1 1 at_home other ... \n", 212 | "2 GP F 15 U LE3 T 1 1 at_home other ... \n", 213 | "3 GP F 15 U GT3 T 4 2 health services ... \n", 214 | "4 GP F 16 U GT3 T 3 3 other other ... \n", 215 | "\n", 216 | " famrel freetime goout Dalc Walc health absences G1 G2 G3 \n", 217 | "0 4 3 4 1 1 3 6 5 6 6 \n", 218 | "1 5 3 3 1 1 3 4 5 5 6 \n", 219 | "2 4 3 2 2 3 3 10 7 8 10 \n", 220 | "3 3 2 2 1 1 5 2 15 14 15 \n", 221 | "4 4 3 2 1 2 5 4 6 10 10 \n", 222 | "\n", 223 | "[5 rows x 33 columns]" 224 | ] 225 | }, 226 | "execution_count": 32, 227 | "metadata": {}, 228 | "output_type": "execute_result" 229 | } 230 | ], 231 | "source": [ 232 | "train1.head()" 233 | ] 234 | }, 235 | { 236 | "cell_type": "code", 237 | "execution_count": 33, 238 | "metadata": {}, 239 | "outputs": [ 240 | { 241 | "data": { 242 | "text/html": [ 243 | "
\n", 244 | "\n", 257 | "\n", 258 | " \n", 259 | " \n", 260 | " \n", 261 | " \n", 262 | " \n", 263 | " \n", 264 | " \n", 265 | " \n", 266 | " \n", 267 | " \n", 268 | " \n", 269 | " \n", 270 | " \n", 271 | " \n", 272 | " \n", 273 | " \n", 274 | " \n", 275 | " \n", 276 | " \n", 277 | " \n", 278 | " \n", 279 | " \n", 280 | " \n", 281 | " \n", 282 | " \n", 283 | " \n", 284 | " \n", 285 | " \n", 286 | " \n", 287 | " \n", 288 | " \n", 289 | " \n", 290 | " \n", 291 | " \n", 292 | " \n", 293 | " \n", 294 | " \n", 295 | " \n", 296 | " \n", 297 | " \n", 298 | " \n", 299 | " \n", 300 | " \n", 301 | " \n", 302 | " \n", 303 | " \n", 304 | " \n", 305 | " \n", 306 | " \n", 307 | " \n", 308 | " \n", 309 | " \n", 310 | " \n", 311 | " \n", 312 | " \n", 313 | " \n", 314 | " \n", 315 | " \n", 316 | " \n", 317 | " \n", 318 | " \n", 319 | " \n", 320 | " \n", 321 | " \n", 322 | " \n", 323 | " \n", 324 | " \n", 325 | " \n", 326 | " \n", 327 | " \n", 328 | " \n", 329 | " \n", 330 | " \n", 331 | " \n", 332 | " \n", 333 | " \n", 334 | " \n", 335 | " \n", 336 | " \n", 337 | " \n", 338 | " \n", 339 | " \n", 340 | " \n", 341 | " \n", 342 | " \n", 343 | " \n", 344 | " \n", 345 | " \n", 346 | " \n", 347 | " \n", 348 | " \n", 349 | " \n", 350 | " \n", 351 | " \n", 352 | " \n", 353 | " \n", 354 | " \n", 355 | " \n", 356 | " \n", 357 | " \n", 358 | " \n", 359 | " \n", 360 | " \n", 361 | " \n", 362 | " \n", 363 | " \n", 364 | " \n", 365 | " \n", 366 | " \n", 367 | " \n", 368 | " \n", 369 | " \n", 370 | " \n", 371 | " \n", 372 | " \n", 373 | " \n", 374 | " \n", 375 | " \n", 376 | " \n", 377 | " \n", 378 | " \n", 379 | " \n", 380 | " \n", 381 | " \n", 382 | " \n", 383 | " \n", 384 | " \n", 385 | " \n", 386 | " \n", 387 | " \n", 388 | " \n", 389 | " \n", 390 | " \n", 391 | " \n", 392 | " \n", 393 | " \n", 394 | " \n", 395 | " \n", 396 | " \n", 397 | " \n", 398 | " \n", 399 | " \n", 400 | " \n", 401 | " \n", 402 | " \n", 403 | " \n", 404 | " \n", 405 | " \n", 406 | "
schoolsexageaddressfamsizePstatusMeduFeduMjobFjob...famrelfreetimegooutDalcWalchealthabsencesG1G2G3
0GPF18UGT3A44at_hometeacher...434113401111
1GPF17UGT3T11at_homeother...533113291111
2GPF15ULE3T11at_homeother...4322336121312
3GPF15UGT3T42healthservices...3221150141414
4GPF16UGT3T33otherother...4321250111313
\n", 407 | "

5 rows × 33 columns

\n", 408 | "
" 409 | ], 410 | "text/plain": [ 411 | " school sex age address famsize Pstatus Medu Fedu Mjob Fjob ... \\\n", 412 | "0 GP F 18 U GT3 A 4 4 at_home teacher ... \n", 413 | "1 GP F 17 U GT3 T 1 1 at_home other ... \n", 414 | "2 GP F 15 U LE3 T 1 1 at_home other ... \n", 415 | "3 GP F 15 U GT3 T 4 2 health services ... \n", 416 | "4 GP F 16 U GT3 T 3 3 other other ... \n", 417 | "\n", 418 | " famrel freetime goout Dalc Walc health absences G1 G2 G3 \n", 419 | "0 4 3 4 1 1 3 4 0 11 11 \n", 420 | "1 5 3 3 1 1 3 2 9 11 11 \n", 421 | "2 4 3 2 2 3 3 6 12 13 12 \n", 422 | "3 3 2 2 1 1 5 0 14 14 14 \n", 423 | "4 4 3 2 1 2 5 0 11 13 13 \n", 424 | "\n", 425 | "[5 rows x 33 columns]" 426 | ] 427 | }, 428 | "execution_count": 33, 429 | "metadata": {}, 430 | "output_type": "execute_result" 431 | } 432 | ], 433 | "source": [ 434 | "train2.head()" 435 | ] 436 | }, 437 | { 438 | "cell_type": "code", 439 | "execution_count": 34, 440 | "metadata": {}, 441 | "outputs": [], 442 | "source": [ 443 | "# train1.info()\n", 444 | "# train2.info()" 445 | ] 446 | }, 447 | { 448 | "cell_type": "code", 449 | "execution_count": 35, 450 | "metadata": {}, 451 | "outputs": [ 452 | { 453 | "name": "stdout", 454 | "output_type": "stream", 455 | "text": [ 456 | "(395, 33)\n", 457 | "(649, 33)\n" 458 | ] 459 | } 460 | ], 461 | "source": [ 462 | "print(train1.shape)\n", 463 | "print(train2.shape)" 464 | ] 465 | }, 466 | { 467 | "cell_type": "code", 468 | "execution_count": 36, 469 | "metadata": {}, 470 | "outputs": [], 471 | "source": [ 472 | "# train1.isnull().sum()" 473 | ] 474 | }, 475 | { 476 | "cell_type": "code", 477 | "execution_count": 37, 478 | "metadata": {}, 479 | "outputs": [], 480 | "source": [ 481 | "# train2.isnull().sum()" 482 | ] 483 | }, 484 | { 485 | "cell_type": "code", 486 | "execution_count": 72, 487 | "metadata": {}, 488 | "outputs": [ 489 | { 490 | "data": { 491 | "text/plain": [ 492 | "LabelEncoder()" 493 | ] 494 | }, 495 | "execution_count": 72, 496 | "metadata": {}, 497 | "output_type": "execute_result" 498 | } 499 | ], 500 | "source": [ 501 | "le=preprocessing.LabelEncoder()\n", 502 | "le.fit(train1['school'])" 503 | ] 504 | }, 505 | { 506 | "cell_type": "code", 507 | "execution_count": 73, 508 | "metadata": {}, 509 | "outputs": [ 510 | { 511 | "data": { 512 | "text/plain": [ 513 | "array([0, 1])" 514 | ] 515 | }, 516 | "execution_count": 73, 517 | "metadata": {}, 518 | "output_type": "execute_result" 519 | } 520 | ], 521 | "source": [ 522 | "le.classes_" 523 | ] 524 | }, 525 | { 526 | "cell_type": "code", 527 | "execution_count": 74, 528 | "metadata": {}, 529 | "outputs": [], 530 | "source": [ 531 | "train1['school']=le.transform(train1['school'])" 532 | ] 533 | }, 534 | { 535 | "cell_type": "code", 536 | "execution_count": 75, 537 | "metadata": {}, 538 | "outputs": [ 539 | { 540 | "data": { 541 | "text/html": [ 542 | "
\n", 543 | "\n", 556 | "\n", 557 | " \n", 558 | " \n", 559 | " \n", 560 | " \n", 561 | " \n", 562 | " \n", 563 | " \n", 564 | " \n", 565 | " \n", 566 | " \n", 567 | " \n", 568 | " \n", 569 | " \n", 570 | " \n", 571 | " \n", 572 | " \n", 573 | " \n", 574 | " \n", 575 | " \n", 576 | " \n", 577 | " \n", 578 | " \n", 579 | " \n", 580 | " \n", 581 | " \n", 582 | " \n", 583 | " \n", 584 | " \n", 585 | " \n", 586 | " \n", 587 | " \n", 588 | " \n", 589 | " \n", 590 | " \n", 591 | " \n", 592 | " \n", 593 | " \n", 594 | " \n", 595 | " \n", 596 | " \n", 597 | " \n", 598 | " \n", 599 | " \n", 600 | " \n", 601 | " \n", 602 | " \n", 603 | " \n", 604 | " \n", 605 | " \n", 606 | " \n", 607 | " \n", 608 | " \n", 609 | " \n", 610 | " \n", 611 | " \n", 612 | " \n", 613 | " \n", 614 | " \n", 615 | " \n", 616 | " \n", 617 | " \n", 618 | " \n", 619 | " \n", 620 | " \n", 621 | " \n", 622 | " \n", 623 | " \n", 624 | " \n", 625 | " \n", 626 | " \n", 627 | " \n", 628 | " \n", 629 | " \n", 630 | " \n", 631 | " \n", 632 | " \n", 633 | " \n", 634 | " \n", 635 | " \n", 636 | " \n", 637 | " \n", 638 | " \n", 639 | " \n", 640 | " \n", 641 | " \n", 642 | " \n", 643 | " \n", 644 | " \n", 645 | " \n", 646 | " \n", 647 | " \n", 648 | " \n", 649 | " \n", 650 | " \n", 651 | " \n", 652 | " \n", 653 | " \n", 654 | " \n", 655 | " \n", 656 | " \n", 657 | " \n", 658 | " \n", 659 | " \n", 660 | " \n", 661 | " \n", 662 | " \n", 663 | " \n", 664 | " \n", 665 | " \n", 666 | " \n", 667 | " \n", 668 | " \n", 669 | " \n", 670 | " \n", 671 | " \n", 672 | " \n", 673 | " \n", 674 | " \n", 675 | " \n", 676 | " \n", 677 | " \n", 678 | " \n", 679 | " \n", 680 | " \n", 681 | " \n", 682 | " \n", 683 | " \n", 684 | " \n", 685 | " \n", 686 | " \n", 687 | " \n", 688 | " \n", 689 | " \n", 690 | " \n", 691 | " \n", 692 | " \n", 693 | " \n", 694 | " \n", 695 | " \n", 696 | " \n", 697 | " \n", 698 | " \n", 699 | " \n", 700 | " \n", 701 | " \n", 702 | " \n", 703 | " \n", 704 | " \n", 705 | "
schoolsexageaddressfamsizePstatusMeduFeduMjobFjob...famrelfreetimegooutDalcWalchealthabsencesG1G2G3
00018UGT3A44at_hometeacher...4341136566
10017UGT3T11at_homeother...5331134556
20015ULE3T11at_homeother...432233107810
30115UGT3T42healthservices...3221152151415
40016UGT3T33otherother...432125461010
\n", 706 | "

5 rows × 33 columns

\n", 707 | "
" 708 | ], 709 | "text/plain": [ 710 | " school sex age address famsize Pstatus Medu Fedu Mjob Fjob \\\n", 711 | "0 0 0 18 U GT3 A 4 4 at_home teacher \n", 712 | "1 0 0 17 U GT3 T 1 1 at_home other \n", 713 | "2 0 0 15 U LE3 T 1 1 at_home other \n", 714 | "3 0 1 15 U GT3 T 4 2 health services \n", 715 | "4 0 0 16 U GT3 T 3 3 other other \n", 716 | "\n", 717 | " ... famrel freetime goout Dalc Walc health absences G1 G2 G3 \n", 718 | "0 ... 4 3 4 1 1 3 6 5 6 6 \n", 719 | "1 ... 5 3 3 1 1 3 4 5 5 6 \n", 720 | "2 ... 4 3 2 2 3 3 10 7 8 10 \n", 721 | "3 ... 3 2 2 1 1 5 2 15 14 15 \n", 722 | "4 ... 4 3 2 1 2 5 4 6 10 10 \n", 723 | "\n", 724 | "[5 rows x 33 columns]" 725 | ] 726 | }, 727 | "execution_count": 75, 728 | "metadata": {}, 729 | "output_type": "execute_result" 730 | } 731 | ], 732 | "source": [ 733 | "train1.head()" 734 | ] 735 | }, 736 | { 737 | "cell_type": "code", 738 | "execution_count": 76, 739 | "metadata": {}, 740 | "outputs": [ 741 | { 742 | "data": { 743 | "text/plain": [ 744 | "Index(['school', 'sex', 'age', 'address', 'famsize', 'Pstatus', 'Medu', 'Fedu',\n", 745 | " 'Mjob', 'Fjob', 'reason', 'guardian', 'traveltime', 'studytime',\n", 746 | " 'failures', 'schoolsup', 'famsup', 'paid', 'activities', 'nursery',\n", 747 | " 'higher', 'internet', 'romantic', 'famrel', 'freetime', 'goout', 'Dalc',\n", 748 | " 'Walc', 'health', 'absences', 'G1', 'G2', 'G3'],\n", 749 | " dtype='object')" 750 | ] 751 | }, 752 | "execution_count": 76, 753 | "metadata": {}, 754 | "output_type": "execute_result" 755 | } 756 | ], 757 | "source": [ 758 | "train1.columns\n", 759 | "\n" 760 | ] 761 | }, 762 | { 763 | "cell_type": "code", 764 | "execution_count": 77, 765 | "metadata": {}, 766 | "outputs": [], 767 | "source": [ 768 | "le.fit(train1['sex'])\n", 769 | "train1['sex']=le.transform(train1['sex'])" 770 | ] 771 | }, 772 | { 773 | "cell_type": "code", 774 | "execution_count": 78, 775 | "metadata": {}, 776 | "outputs": [], 777 | "source": [ 778 | "# train1.head()" 779 | ] 780 | }, 781 | { 782 | "cell_type": "code", 783 | "execution_count": 79, 784 | "metadata": {}, 785 | "outputs": [], 786 | "source": [ 787 | "le.fit(train1['address'])\n", 788 | "train1['address']=le.transform(train1['address'])" 789 | ] 790 | }, 791 | { 792 | "cell_type": "code", 793 | "execution_count": 80, 794 | "metadata": {}, 795 | "outputs": [], 796 | "source": [ 797 | "le.fit(train1['famsize'])\n", 798 | "train1['famsize']=le.transform(train1['famsize'])" 799 | ] 800 | }, 801 | { 802 | "cell_type": "code", 803 | "execution_count": 81, 804 | "metadata": {}, 805 | "outputs": [], 806 | "source": [ 807 | "le.fit(train1['Pstatus'])\n", 808 | "train1['Pstatus']=le.transform(train1['Pstatus'])" 809 | ] 810 | }, 811 | { 812 | "cell_type": "code", 813 | "execution_count": 82, 814 | "metadata": {}, 815 | "outputs": [], 816 | "source": [ 817 | "le.fit(train1['Mjob'])\n", 818 | "train1['Mjob']=le.transform(train1['Mjob'])" 819 | ] 820 | }, 821 | { 822 | "cell_type": "code", 823 | "execution_count": 83, 824 | "metadata": {}, 825 | "outputs": [], 826 | "source": [ 827 | "le.fit(train1['Fjob'])\n", 828 | "train1['Fjob']=le.transform(train1['Fjob'])" 829 | ] 830 | }, 831 | { 832 | "cell_type": "code", 833 | "execution_count": 84, 834 | "metadata": {}, 835 | "outputs": [], 836 | "source": [ 837 | "le.fit(train1['reason'])\n", 838 | "train1['reason']=le.transform(train1['reason'])" 839 | ] 840 | }, 841 | { 842 | "cell_type": "code", 843 | "execution_count": 85, 844 | "metadata": {}, 845 | "outputs": [], 846 | "source": [ 847 | "le.fit(train1['guardian'])\n", 848 | "train1['guardian']=le.transform(train1['guardian'])" 849 | ] 850 | }, 851 | { 852 | "cell_type": "code", 853 | "execution_count": 86, 854 | "metadata": {}, 855 | "outputs": [], 856 | "source": [ 857 | "le.fit(train1['schoolsup'])\n", 858 | "train1['schoolsup']=le.transform(train1['schoolsup'])" 859 | ] 860 | }, 861 | { 862 | "cell_type": "code", 863 | "execution_count": 87, 864 | "metadata": {}, 865 | "outputs": [], 866 | "source": [ 867 | "le.fit(train1['famsup'])\n", 868 | "train1['famsup']=le.transform(train1['famsup'])" 869 | ] 870 | }, 871 | { 872 | "cell_type": "code", 873 | "execution_count": 88, 874 | "metadata": {}, 875 | "outputs": [], 876 | "source": [ 877 | "le.fit(train1['paid'])\n", 878 | "train1['paid']=le.transform(train1['paid'])" 879 | ] 880 | }, 881 | { 882 | "cell_type": "code", 883 | "execution_count": 89, 884 | "metadata": {}, 885 | "outputs": [], 886 | "source": [ 887 | "le.fit(train1['activities'])\n", 888 | "train1['activities']=le.transform(train1['activities'])" 889 | ] 890 | }, 891 | { 892 | "cell_type": "code", 893 | "execution_count": 90, 894 | "metadata": {}, 895 | "outputs": [], 896 | "source": [ 897 | "le.fit(train1['nursery'])\n", 898 | "train1['nursery']=le.transform(train1['nursery'])" 899 | ] 900 | }, 901 | { 902 | "cell_type": "code", 903 | "execution_count": 91, 904 | "metadata": {}, 905 | "outputs": [], 906 | "source": [ 907 | "le.fit(train1['higher'])\n", 908 | "train1['higher']=le.transform(train1['higher'])" 909 | ] 910 | }, 911 | { 912 | "cell_type": "code", 913 | "execution_count": 92, 914 | "metadata": {}, 915 | "outputs": [], 916 | "source": [ 917 | "le.fit(train1['internet'])\n", 918 | "train1['internet']=le.transform(train1['internet'])" 919 | ] 920 | }, 921 | { 922 | "cell_type": "code", 923 | "execution_count": 93, 924 | "metadata": {}, 925 | "outputs": [], 926 | "source": [ 927 | "le.fit(train1['romantic'])\n", 928 | "train1['romantic']=le.transform(train1['romantic'])" 929 | ] 930 | }, 931 | { 932 | "cell_type": "code", 933 | "execution_count": 95, 934 | "metadata": {}, 935 | "outputs": [ 936 | { 937 | "data": { 938 | "text/html": [ 939 | "
\n", 940 | "\n", 953 | "\n", 954 | " \n", 955 | " \n", 956 | " \n", 957 | " \n", 958 | " \n", 959 | " \n", 960 | " \n", 961 | " \n", 962 | " \n", 963 | " \n", 964 | " \n", 965 | " \n", 966 | " \n", 967 | " \n", 968 | " \n", 969 | " \n", 970 | " \n", 971 | " \n", 972 | " \n", 973 | " \n", 974 | " \n", 975 | " \n", 976 | " \n", 977 | " \n", 978 | " \n", 979 | " \n", 980 | " \n", 981 | " \n", 982 | " \n", 983 | " \n", 984 | " \n", 985 | " \n", 986 | " \n", 987 | " \n", 988 | " \n", 989 | " \n", 990 | " \n", 991 | " \n", 992 | " \n", 993 | " \n", 994 | " \n", 995 | " \n", 996 | " \n", 997 | " \n", 998 | " \n", 999 | " \n", 1000 | " \n", 1001 | " \n", 1002 | " \n", 1003 | " \n", 1004 | " \n", 1005 | " \n", 1006 | " \n", 1007 | " \n", 1008 | " \n", 1009 | " \n", 1010 | " \n", 1011 | " \n", 1012 | " \n", 1013 | " \n", 1014 | " \n", 1015 | " \n", 1016 | " \n", 1017 | " \n", 1018 | " \n", 1019 | " \n", 1020 | " \n", 1021 | " \n", 1022 | " \n", 1023 | " \n", 1024 | " \n", 1025 | " \n", 1026 | " \n", 1027 | " \n", 1028 | " \n", 1029 | " \n", 1030 | " \n", 1031 | " \n", 1032 | " \n", 1033 | " \n", 1034 | " \n", 1035 | " \n", 1036 | " \n", 1037 | " \n", 1038 | " \n", 1039 | " \n", 1040 | " \n", 1041 | " \n", 1042 | " \n", 1043 | " \n", 1044 | " \n", 1045 | " \n", 1046 | " \n", 1047 | " \n", 1048 | " \n", 1049 | " \n", 1050 | " \n", 1051 | " \n", 1052 | " \n", 1053 | " \n", 1054 | " \n", 1055 | " \n", 1056 | " \n", 1057 | " \n", 1058 | " \n", 1059 | " \n", 1060 | " \n", 1061 | " \n", 1062 | " \n", 1063 | " \n", 1064 | " \n", 1065 | " \n", 1066 | " \n", 1067 | " \n", 1068 | " \n", 1069 | " \n", 1070 | " \n", 1071 | " \n", 1072 | " \n", 1073 | " \n", 1074 | " \n", 1075 | " \n", 1076 | " \n", 1077 | " \n", 1078 | " \n", 1079 | " \n", 1080 | " \n", 1081 | " \n", 1082 | " \n", 1083 | " \n", 1084 | " \n", 1085 | " \n", 1086 | " \n", 1087 | " \n", 1088 | " \n", 1089 | " \n", 1090 | " \n", 1091 | " \n", 1092 | " \n", 1093 | " \n", 1094 | " \n", 1095 | " \n", 1096 | " \n", 1097 | " \n", 1098 | " \n", 1099 | " \n", 1100 | " \n", 1101 | " \n", 1102 | " \n", 1103 | " \n", 1104 | " \n", 1105 | " \n", 1106 | " \n", 1107 | " \n", 1108 | " \n", 1109 | " \n", 1110 | " \n", 1111 | " \n", 1112 | " \n", 1113 | " \n", 1114 | " \n", 1115 | " \n", 1116 | " \n", 1117 | " \n", 1118 | " \n", 1119 | " \n", 1120 | " \n", 1121 | " \n", 1122 | " \n", 1123 | " \n", 1124 | " \n", 1125 | " \n", 1126 | " \n", 1127 | " \n", 1128 | " \n", 1129 | " \n", 1130 | " \n", 1131 | " \n", 1132 | " \n", 1133 | " \n", 1134 | " \n", 1135 | " \n", 1136 | " \n", 1137 | " \n", 1138 | " \n", 1139 | " \n", 1140 | " \n", 1141 | " \n", 1142 | " \n", 1143 | " \n", 1144 | " \n", 1145 | " \n", 1146 | " \n", 1147 | " \n", 1148 | " \n", 1149 | " \n", 1150 | " \n", 1151 | " \n", 1152 | " \n", 1153 | " \n", 1154 | " \n", 1155 | " \n", 1156 | " \n", 1157 | " \n", 1158 | " \n", 1159 | " \n", 1160 | " \n", 1161 | " \n", 1162 | " \n", 1163 | " \n", 1164 | " \n", 1165 | " \n", 1166 | " \n", 1167 | " \n", 1168 | " \n", 1169 | " \n", 1170 | " \n", 1171 | " \n", 1172 | " \n", 1173 | " \n", 1174 | " \n", 1175 | " \n", 1176 | " \n", 1177 | " \n", 1178 | " \n", 1179 | " \n", 1180 | " \n", 1181 | " \n", 1182 | " \n", 1183 | " \n", 1184 | " \n", 1185 | " \n", 1186 | " \n", 1187 | " \n", 1188 | " \n", 1189 | " \n", 1190 | " \n", 1191 | " \n", 1192 | " \n", 1193 | " \n", 1194 | " \n", 1195 | " \n", 1196 | " \n", 1197 | " \n", 1198 | " \n", 1199 | " \n", 1200 | " \n", 1201 | " \n", 1202 | " \n", 1203 | " \n", 1204 | " \n", 1205 | " \n", 1206 | " \n", 1207 | " \n", 1208 | " \n", 1209 | " \n", 1210 | " \n", 1211 | " \n", 1212 | " \n", 1213 | " \n", 1214 | " \n", 1215 | " \n", 1216 | " \n", 1217 | " \n", 1218 | " \n", 1219 | " \n", 1220 | " \n", 1221 | " \n", 1222 | "
schoolsexageaddressfamsizePstatusMeduFeduMjobFjob...famrelfreetimegooutDalcWalchealthabsencesG1G2G3
000181004404...4341136566
100171011102...5331134556
200151111102...432233107810
301151014213...3221152151415
400161013322...432125461010
500161114332...54212510151515
600161112222...4441130121211
700171004424...4141116656
800151103232...4221110161819
900151013422...5511150141515
\n", 1223 | "

10 rows × 33 columns

\n", 1224 | "
" 1225 | ], 1226 | "text/plain": [ 1227 | " school sex age address famsize Pstatus Medu Fedu Mjob Fjob ... \\\n", 1228 | "0 0 0 18 1 0 0 4 4 0 4 ... \n", 1229 | "1 0 0 17 1 0 1 1 1 0 2 ... \n", 1230 | "2 0 0 15 1 1 1 1 1 0 2 ... \n", 1231 | "3 0 1 15 1 0 1 4 2 1 3 ... \n", 1232 | "4 0 0 16 1 0 1 3 3 2 2 ... \n", 1233 | "5 0 0 16 1 1 1 4 3 3 2 ... \n", 1234 | "6 0 0 16 1 1 1 2 2 2 2 ... \n", 1235 | "7 0 0 17 1 0 0 4 4 2 4 ... \n", 1236 | "8 0 0 15 1 1 0 3 2 3 2 ... \n", 1237 | "9 0 0 15 1 0 1 3 4 2 2 ... \n", 1238 | "\n", 1239 | " famrel freetime goout Dalc Walc health absences G1 G2 G3 \n", 1240 | "0 4 3 4 1 1 3 6 5 6 6 \n", 1241 | "1 5 3 3 1 1 3 4 5 5 6 \n", 1242 | "2 4 3 2 2 3 3 10 7 8 10 \n", 1243 | "3 3 2 2 1 1 5 2 15 14 15 \n", 1244 | "4 4 3 2 1 2 5 4 6 10 10 \n", 1245 | "5 5 4 2 1 2 5 10 15 15 15 \n", 1246 | "6 4 4 4 1 1 3 0 12 12 11 \n", 1247 | "7 4 1 4 1 1 1 6 6 5 6 \n", 1248 | "8 4 2 2 1 1 1 0 16 18 19 \n", 1249 | "9 5 5 1 1 1 5 0 14 15 15 \n", 1250 | "\n", 1251 | "[10 rows x 33 columns]" 1252 | ] 1253 | }, 1254 | "execution_count": 95, 1255 | "metadata": {}, 1256 | "output_type": "execute_result" 1257 | } 1258 | ], 1259 | "source": [ 1260 | "train1.head(10)" 1261 | ] 1262 | }, 1263 | { 1264 | "cell_type": "code", 1265 | "execution_count": 96, 1266 | "metadata": {}, 1267 | "outputs": [], 1268 | "source": [ 1269 | "train1_y=train1['G3']" 1270 | ] 1271 | }, 1272 | { 1273 | "cell_type": "code", 1274 | "execution_count": 100, 1275 | "metadata": {}, 1276 | "outputs": [ 1277 | { 1278 | "data": { 1279 | "text/html": [ 1280 | "
\n", 1281 | "\n", 1294 | "\n", 1295 | " \n", 1296 | " \n", 1297 | " \n", 1298 | " \n", 1299 | " \n", 1300 | " \n", 1301 | " \n", 1302 | " \n", 1303 | " \n", 1304 | " \n", 1305 | " \n", 1306 | " \n", 1307 | " \n", 1308 | " \n", 1309 | " \n", 1310 | " \n", 1311 | " \n", 1312 | " \n", 1313 | " \n", 1314 | " \n", 1315 | " \n", 1316 | " \n", 1317 | " \n", 1318 | " \n", 1319 | " \n", 1320 | " \n", 1321 | " \n", 1322 | " \n", 1323 | " \n", 1324 | " \n", 1325 | " \n", 1326 | " \n", 1327 | " \n", 1328 | " \n", 1329 | " \n", 1330 | " \n", 1331 | " \n", 1332 | " \n", 1333 | " \n", 1334 | " \n", 1335 | " \n", 1336 | " \n", 1337 | " \n", 1338 | " \n", 1339 | " \n", 1340 | " \n", 1341 | " \n", 1342 | " \n", 1343 | " \n", 1344 | " \n", 1345 | " \n", 1346 | " \n", 1347 | " \n", 1348 | " \n", 1349 | " \n", 1350 | " \n", 1351 | " \n", 1352 | " \n", 1353 | " \n", 1354 | " \n", 1355 | " \n", 1356 | " \n", 1357 | " \n", 1358 | " \n", 1359 | " \n", 1360 | " \n", 1361 | " \n", 1362 | " \n", 1363 | " \n", 1364 | " \n", 1365 | " \n", 1366 | " \n", 1367 | " \n", 1368 | " \n", 1369 | " \n", 1370 | " \n", 1371 | " \n", 1372 | " \n", 1373 | " \n", 1374 | " \n", 1375 | " \n", 1376 | " \n", 1377 | " \n", 1378 | " \n", 1379 | " \n", 1380 | " \n", 1381 | " \n", 1382 | " \n", 1383 | " \n", 1384 | " \n", 1385 | " \n", 1386 | " \n", 1387 | " \n", 1388 | " \n", 1389 | " \n", 1390 | " \n", 1391 | " \n", 1392 | " \n", 1393 | " \n", 1394 | " \n", 1395 | " \n", 1396 | " \n", 1397 | " \n", 1398 | " \n", 1399 | " \n", 1400 | " \n", 1401 | " \n", 1402 | " \n", 1403 | " \n", 1404 | " \n", 1405 | " \n", 1406 | " \n", 1407 | " \n", 1408 | " \n", 1409 | " \n", 1410 | " \n", 1411 | " \n", 1412 | " \n", 1413 | " \n", 1414 | " \n", 1415 | " \n", 1416 | " \n", 1417 | " \n", 1418 | " \n", 1419 | " \n", 1420 | " \n", 1421 | " \n", 1422 | " \n", 1423 | " \n", 1424 | " \n", 1425 | " \n", 1426 | " \n", 1427 | " \n", 1428 | " \n", 1429 | " \n", 1430 | " \n", 1431 | " \n", 1432 | " \n", 1433 | " \n", 1434 | " \n", 1435 | " \n", 1436 | " \n", 1437 | " \n", 1438 | " \n", 1439 | " \n", 1440 | " \n", 1441 | " \n", 1442 | " \n", 1443 | "
schoolsexageaddressfamsizePstatusMeduFeduMjobFjob...romanticfamrelfreetimegooutDalcWalchealthabsencesG1G2
000181004404...0434113656
100171011102...0533113455
200151111102...04322331078
301151014213...132211521514
400161013322...04321254610
\n", 1444 | "

5 rows × 32 columns

\n", 1445 | "
" 1446 | ], 1447 | "text/plain": [ 1448 | " school sex age address famsize Pstatus Medu Fedu Mjob Fjob ... \\\n", 1449 | "0 0 0 18 1 0 0 4 4 0 4 ... \n", 1450 | "1 0 0 17 1 0 1 1 1 0 2 ... \n", 1451 | "2 0 0 15 1 1 1 1 1 0 2 ... \n", 1452 | "3 0 1 15 1 0 1 4 2 1 3 ... \n", 1453 | "4 0 0 16 1 0 1 3 3 2 2 ... \n", 1454 | "\n", 1455 | " romantic famrel freetime goout Dalc Walc health absences G1 G2 \n", 1456 | "0 0 4 3 4 1 1 3 6 5 6 \n", 1457 | "1 0 5 3 3 1 1 3 4 5 5 \n", 1458 | "2 0 4 3 2 2 3 3 10 7 8 \n", 1459 | "3 1 3 2 2 1 1 5 2 15 14 \n", 1460 | "4 0 4 3 2 1 2 5 4 6 10 \n", 1461 | "\n", 1462 | "[5 rows x 32 columns]" 1463 | ] 1464 | }, 1465 | "execution_count": 100, 1466 | "metadata": {}, 1467 | "output_type": "execute_result" 1468 | } 1469 | ], 1470 | "source": [ 1471 | "train1 = train1.drop(labels=['G3'],axis=1)\n", 1472 | "train1.head()" 1473 | ] 1474 | }, 1475 | { 1476 | "cell_type": "code", 1477 | "execution_count": 101, 1478 | "metadata": {}, 1479 | "outputs": [ 1480 | { 1481 | "ename": "NameError", 1482 | "evalue": "name 'LogisticRegression' is not defined", 1483 | "output_type": "error", 1484 | "traceback": [ 1485 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 1486 | "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", 1487 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mlg\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mLogisticRegression\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", 1488 | "\u001b[0;31mNameError\u001b[0m: name 'LogisticRegression' is not defined" 1489 | ] 1490 | } 1491 | ], 1492 | "source": [ 1493 | "from sklearn.linear_model import LogisticRegression\n", 1494 | "lr = LogisticRegression()\n" 1495 | ] 1496 | }, 1497 | { 1498 | "cell_type": "code", 1499 | "execution_count": null, 1500 | "metadata": {}, 1501 | "outputs": [], 1502 | "source": [] 1503 | } 1504 | ], 1505 | "metadata": { 1506 | "kernelspec": { 1507 | "display_name": "Python 3", 1508 | "language": "python", 1509 | "name": "python3" 1510 | }, 1511 | "language_info": { 1512 | "codemirror_mode": { 1513 | "name": "ipython", 1514 | "version": 3 1515 | }, 1516 | "file_extension": ".py", 1517 | "mimetype": "text/x-python", 1518 | "name": "python", 1519 | "nbconvert_exporter": "python", 1520 | "pygments_lexer": "ipython3", 1521 | "version": "3.6.6" 1522 | } 1523 | }, 1524 | "nbformat": 4, 1525 | "nbformat_minor": 2 1526 | } 1527 | -------------------------------------------------------------------------------- /Study_time_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/Study_time_plot.png -------------------------------------------------------------------------------- /Untitled.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 39, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np \n", 10 | "import pandas as pd\n", 11 | "import sklearn\n", 12 | "from sklearn.ensemble import ExtraTreesRegressor\n", 13 | "from sklearn.externals import joblib\n", 14 | "from keras import Sequential\n", 15 | "from keras.layers import LSTM, Dropout, Dense\n", 16 | "from sklearn.linear_model import LinearRegression, SGDRegressor\n", 17 | "from sklearn.metrics import mean_squared_error\n", 18 | "from sklearn import preprocessing \n", 19 | "from xgboost import XGBRegressor, plot_importance\n", 20 | "from matplotlib import pyplot\n" 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": 40, 26 | "metadata": {}, 27 | "outputs": [], 28 | "source": [ 29 | "train_por = pd.read_csv('student-por.csv')\n", 30 | "train_mat = pd.read_csv('student-mat.csv')" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": 41, 36 | "metadata": {}, 37 | "outputs": [ 38 | { 39 | "data": { 40 | "text/html": [ 41 | "
\n", 42 | "\n", 55 | "\n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | " \n", 98 | " \n", 99 | " \n", 100 | " \n", 101 | " \n", 102 | " \n", 103 | " \n", 104 | " \n", 105 | " \n", 106 | " \n", 107 | " \n", 108 | " \n", 109 | " \n", 110 | " \n", 111 | " \n", 112 | " \n", 113 | " \n", 114 | " \n", 115 | " \n", 116 | " \n", 117 | " \n", 118 | " \n", 119 | " \n", 120 | " \n", 121 | " \n", 122 | " \n", 123 | " \n", 124 | " \n", 125 | " \n", 126 | " \n", 127 | " \n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | "
schoolsexageaddressfamsizePstatusMeduFeduMjobFjob...famrelfreetimegooutDalcWalchealthabsencesG1G2G3
0GPF18UGT3A44at_hometeacher...434113401111
1GPF17UGT3T11at_homeother...533113291111
2GPF15ULE3T11at_homeother...4322336121312
3GPF15UGT3T42healthservices...3221150141414
4GPF16UGT3T33otherother...4321250111313
\n", 205 | "

5 rows × 33 columns

\n", 206 | "
" 207 | ], 208 | "text/plain": [ 209 | " school sex age address famsize Pstatus Medu Fedu Mjob Fjob ... \\\n", 210 | "0 GP F 18 U GT3 A 4 4 at_home teacher ... \n", 211 | "1 GP F 17 U GT3 T 1 1 at_home other ... \n", 212 | "2 GP F 15 U LE3 T 1 1 at_home other ... \n", 213 | "3 GP F 15 U GT3 T 4 2 health services ... \n", 214 | "4 GP F 16 U GT3 T 3 3 other other ... \n", 215 | "\n", 216 | " famrel freetime goout Dalc Walc health absences G1 G2 G3 \n", 217 | "0 4 3 4 1 1 3 4 0 11 11 \n", 218 | "1 5 3 3 1 1 3 2 9 11 11 \n", 219 | "2 4 3 2 2 3 3 6 12 13 12 \n", 220 | "3 3 2 2 1 1 5 0 14 14 14 \n", 221 | "4 4 3 2 1 2 5 0 11 13 13 \n", 222 | "\n", 223 | "[5 rows x 33 columns]" 224 | ] 225 | }, 226 | "execution_count": 41, 227 | "metadata": {}, 228 | "output_type": "execute_result" 229 | } 230 | ], 231 | "source": [ 232 | "train_por.head()" 233 | ] 234 | }, 235 | { 236 | "cell_type": "code", 237 | "execution_count": 1, 238 | "metadata": {}, 239 | "outputs": [ 240 | { 241 | "ename": "NameError", 242 | "evalue": "name 'train_mat' is not defined", 243 | "output_type": "error", 244 | "traceback": [ 245 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 246 | "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", 247 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtrain_mat\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", 248 | "\u001b[0;31mNameError\u001b[0m: name 'train_mat' is not defined" 249 | ] 250 | } 251 | ], 252 | "source": [ 253 | "train_mat.head()" 254 | ] 255 | }, 256 | { 257 | "cell_type": "code", 258 | "execution_count": 43, 259 | "metadata": {}, 260 | "outputs": [ 261 | { 262 | "data": { 263 | "text/plain": [ 264 | "(649, 33)" 265 | ] 266 | }, 267 | "execution_count": 43, 268 | "metadata": {}, 269 | "output_type": "execute_result" 270 | } 271 | ], 272 | "source": [ 273 | "train_por.shape" 274 | ] 275 | }, 276 | { 277 | "cell_type": "code", 278 | "execution_count": 44, 279 | "metadata": {}, 280 | "outputs": [ 281 | { 282 | "data": { 283 | "text/plain": [ 284 | "(649, 33)" 285 | ] 286 | }, 287 | "execution_count": 44, 288 | "metadata": {}, 289 | "output_type": "execute_result" 290 | } 291 | ], 292 | "source": [ 293 | "train_por.dropna().shape #no null values in train_por\n" 294 | ] 295 | }, 296 | { 297 | "cell_type": "code", 298 | "execution_count": 45, 299 | "metadata": {}, 300 | "outputs": [ 301 | { 302 | "data": { 303 | "text/plain": [ 304 | "(395, 33)" 305 | ] 306 | }, 307 | "execution_count": 45, 308 | "metadata": {}, 309 | "output_type": "execute_result" 310 | } 311 | ], 312 | "source": [ 313 | "train_mat.shape" 314 | ] 315 | }, 316 | { 317 | "cell_type": "code", 318 | "execution_count": 46, 319 | "metadata": {}, 320 | "outputs": [ 321 | { 322 | "data": { 323 | "text/plain": [ 324 | "(395, 33)" 325 | ] 326 | }, 327 | "execution_count": 46, 328 | "metadata": {}, 329 | "output_type": "execute_result" 330 | } 331 | ], 332 | "source": [ 333 | "train_mat.dropna().shape #no null values in train_mat\n" 334 | ] 335 | }, 336 | { 337 | "cell_type": "code", 338 | "execution_count": 60, 339 | "metadata": {}, 340 | "outputs": [], 341 | "source": [ 342 | "train_por['subject']='Portuguese'" 343 | ] 344 | }, 345 | { 346 | "cell_type": "code", 347 | "execution_count": 61, 348 | "metadata": {}, 349 | "outputs": [], 350 | "source": [ 351 | "train_mat['subject']='Maths'" 352 | ] 353 | }, 354 | { 355 | "cell_type": "code", 356 | "execution_count": 65, 357 | "metadata": {}, 358 | "outputs": [], 359 | "source": [ 360 | "train=pd.concat([train_por, train_mat], axis=0) #combining two data files with subject as discriminant column to distinguish columns" 361 | ] 362 | }, 363 | { 364 | "cell_type": "code", 365 | "execution_count": 67, 366 | "metadata": {}, 367 | "outputs": [ 368 | { 369 | "data": { 370 | "text/html": [ 371 | "
\n", 372 | "\n", 385 | "\n", 386 | " \n", 387 | " \n", 388 | " \n", 389 | " \n", 390 | " \n", 391 | " \n", 392 | " \n", 393 | " \n", 394 | " \n", 395 | " \n", 396 | " \n", 397 | " \n", 398 | " \n", 399 | " \n", 400 | " \n", 401 | " \n", 402 | " \n", 403 | " \n", 404 | " \n", 405 | " \n", 406 | " \n", 407 | " \n", 408 | " \n", 409 | " \n", 410 | " \n", 411 | " \n", 412 | " \n", 413 | " \n", 414 | " \n", 415 | " \n", 416 | " \n", 417 | " \n", 418 | " \n", 419 | " \n", 420 | " \n", 421 | " \n", 422 | " \n", 423 | " \n", 424 | " \n", 425 | " \n", 426 | " \n", 427 | " \n", 428 | " \n", 429 | " \n", 430 | " \n", 431 | " \n", 432 | " \n", 433 | " \n", 434 | " \n", 435 | " \n", 436 | " \n", 437 | " \n", 438 | " \n", 439 | " \n", 440 | " \n", 441 | " \n", 442 | " \n", 443 | " \n", 444 | " \n", 445 | " \n", 446 | " \n", 447 | " \n", 448 | " \n", 449 | " \n", 450 | " \n", 451 | " \n", 452 | " \n", 453 | " \n", 454 | " \n", 455 | " \n", 456 | " \n", 457 | " \n", 458 | " \n", 459 | " \n", 460 | " \n", 461 | " \n", 462 | " \n", 463 | " \n", 464 | " \n", 465 | " \n", 466 | " \n", 467 | " \n", 468 | " \n", 469 | " \n", 470 | " \n", 471 | " \n", 472 | " \n", 473 | " \n", 474 | " \n", 475 | " \n", 476 | " \n", 477 | " \n", 478 | " \n", 479 | " \n", 480 | " \n", 481 | " \n", 482 | " \n", 483 | " \n", 484 | " \n", 485 | " \n", 486 | " \n", 487 | " \n", 488 | " \n", 489 | " \n", 490 | " \n", 491 | " \n", 492 | " \n", 493 | " \n", 494 | " \n", 495 | " \n", 496 | " \n", 497 | " \n", 498 | " \n", 499 | " \n", 500 | " \n", 501 | " \n", 502 | " \n", 503 | " \n", 504 | " \n", 505 | " \n", 506 | " \n", 507 | " \n", 508 | " \n", 509 | " \n", 510 | " \n", 511 | " \n", 512 | " \n", 513 | " \n", 514 | " \n", 515 | " \n", 516 | " \n", 517 | " \n", 518 | " \n", 519 | " \n", 520 | " \n", 521 | " \n", 522 | " \n", 523 | " \n", 524 | " \n", 525 | " \n", 526 | " \n", 527 | " \n", 528 | " \n", 529 | " \n", 530 | " \n", 531 | " \n", 532 | " \n", 533 | " \n", 534 | "
schoolsexageaddressfamsizePstatusMeduFeduMjobFjob...freetimegooutDalcWalchealthabsencesG1G2G3subject
0GPF18UGT3A44at_hometeacher...34113401111Portuguese
1GPF17UGT3T11at_homeother...33113291111Portuguese
2GPF15ULE3T11at_homeother...322336121312Portuguese
3GPF15UGT3T42healthservices...221150141414Portuguese
4GPF16UGT3T33otherother...321250111313Portuguese
\n", 535 | "

5 rows × 34 columns

\n", 536 | "
" 537 | ], 538 | "text/plain": [ 539 | " school sex age address famsize Pstatus Medu Fedu Mjob Fjob \\\n", 540 | "0 GP F 18 U GT3 A 4 4 at_home teacher \n", 541 | "1 GP F 17 U GT3 T 1 1 at_home other \n", 542 | "2 GP F 15 U LE3 T 1 1 at_home other \n", 543 | "3 GP F 15 U GT3 T 4 2 health services \n", 544 | "4 GP F 16 U GT3 T 3 3 other other \n", 545 | "\n", 546 | " ... freetime goout Dalc Walc health absences G1 G2 G3 \\\n", 547 | "0 ... 3 4 1 1 3 4 0 11 11 \n", 548 | "1 ... 3 3 1 1 3 2 9 11 11 \n", 549 | "2 ... 3 2 2 3 3 6 12 13 12 \n", 550 | "3 ... 2 2 1 1 5 0 14 14 14 \n", 551 | "4 ... 3 2 1 2 5 0 11 13 13 \n", 552 | "\n", 553 | " subject \n", 554 | "0 Portuguese \n", 555 | "1 Portuguese \n", 556 | "2 Portuguese \n", 557 | "3 Portuguese \n", 558 | "4 Portuguese \n", 559 | "\n", 560 | "[5 rows x 34 columns]" 561 | ] 562 | }, 563 | "execution_count": 67, 564 | "metadata": {}, 565 | "output_type": "execute_result" 566 | } 567 | ], 568 | "source": [ 569 | "train.head()" 570 | ] 571 | }, 572 | { 573 | "cell_type": "code", 574 | "execution_count": 68, 575 | "metadata": {}, 576 | "outputs": [], 577 | "source": [ 578 | "train.to_csv('student.csv', index=False)" 579 | ] 580 | }, 581 | { 582 | "cell_type": "code", 583 | "execution_count": null, 584 | "metadata": {}, 585 | "outputs": [], 586 | "source": [] 587 | } 588 | ], 589 | "metadata": { 590 | "kernelspec": { 591 | "display_name": "Python 3", 592 | "language": "python", 593 | "name": "python3" 594 | }, 595 | "language_info": { 596 | "codemirror_mode": { 597 | "name": "ipython", 598 | "version": 3 599 | }, 600 | "file_extension": ".py", 601 | "mimetype": "text/x-python", 602 | "name": "python", 603 | "nbconvert_exporter": "python", 604 | "pygments_lexer": "ipython3", 605 | "version": "3.6.6" 606 | } 607 | }, 608 | "nbformat": 4, 609 | "nbformat_minor": 2 610 | } 611 | -------------------------------------------------------------------------------- /address_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/address_plot.png -------------------------------------------------------------------------------- /age_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/age_plot.png -------------------------------------------------------------------------------- /alcohol_consumption_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/alcohol_consumption_plot.png -------------------------------------------------------------------------------- /attend_nursery_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/attend_nursery_plot.png -------------------------------------------------------------------------------- /confusion_matrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/confusion_matrix.png -------------------------------------------------------------------------------- /correlation_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/correlation_plot.png -------------------------------------------------------------------------------- /extracurricular_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/extracurricular_plot.png -------------------------------------------------------------------------------- /failures_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/failures_plot.png -------------------------------------------------------------------------------- /fam_relationship_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/fam_relationship_plot.png -------------------------------------------------------------------------------- /family_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/family_plot.png -------------------------------------------------------------------------------- /free_time_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/free_time_plot.png -------------------------------------------------------------------------------- /gender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/gender.png -------------------------------------------------------------------------------- /gender_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/gender_plot.png -------------------------------------------------------------------------------- /grades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/grades.png -------------------------------------------------------------------------------- /higher_education_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/higher_education_plot.png -------------------------------------------------------------------------------- /internet_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/internet_plot.png -------------------------------------------------------------------------------- /model_xgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/model_xgb -------------------------------------------------------------------------------- /paid_claases_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/paid_claases_plot.png -------------------------------------------------------------------------------- /pickle/model_ada.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/pickle/model_ada.pkl -------------------------------------------------------------------------------- /pickle/model_dt.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/pickle/model_dt.pkl -------------------------------------------------------------------------------- /pickle/model_lr.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/pickle/model_lr.pkl -------------------------------------------------------------------------------- /pickle/model_rf.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/pickle/model_rf.pkl -------------------------------------------------------------------------------- /pickle/model_svm.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/pickle/model_svm.pkl -------------------------------------------------------------------------------- /pickle/model_xgb.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/pickle/model_xgb.pkl -------------------------------------------------------------------------------- /rom_relationship_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/rom_relationship_plot.png -------------------------------------------------------------------------------- /school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/school.png -------------------------------------------------------------------------------- /school_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/school_plot.png -------------------------------------------------------------------------------- /school_support_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/school_support_plot.png -------------------------------------------------------------------------------- /student-mat.csv: -------------------------------------------------------------------------------- 1 | school,sex,age,address,famsize,Pstatus,Medu,Fedu,Mjob,Fjob,reason,guardian,traveltime,studytime,failures,schoolsup,famsup,paid,activities,nursery,higher,internet,romantic,famrel,freetime,goout,Dalc,Walc,health,absences,G1,G2,G3 2 | "GP","F",18,"U","GT3","A",4,4,"at_home","teacher","course","mother",2,2,0,"yes","no","no","no","yes","yes","no","no",4,3,4,1,1,3,6,"5","6",6 3 | "GP","F",17,"U","GT3","T",1,1,"at_home","other","course","father",1,2,0,"no","yes","no","no","no","yes","yes","no",5,3,3,1,1,3,4,"5","5",6 4 | "GP","F",15,"U","LE3","T",1,1,"at_home","other","other","mother",1,2,3,"yes","no","yes","no","yes","yes","yes","no",4,3,2,2,3,3,10,"7","8",10 5 | "GP","F",15,"U","GT3","T",4,2,"health","services","home","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","yes",3,2,2,1,1,5,2,"15","14",15 6 | "GP","F",16,"U","GT3","T",3,3,"other","other","home","father",1,2,0,"no","yes","yes","no","yes","yes","no","no",4,3,2,1,2,5,4,"6","10",10 7 | "GP","M",16,"U","LE3","T",4,3,"services","other","reputation","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",5,4,2,1,2,5,10,"15","15",15 8 | "GP","M",16,"U","LE3","T",2,2,"other","other","home","mother",1,2,0,"no","no","no","no","yes","yes","yes","no",4,4,4,1,1,3,0,"12","12",11 9 | "GP","F",17,"U","GT3","A",4,4,"other","teacher","home","mother",2,2,0,"yes","yes","no","no","yes","yes","no","no",4,1,4,1,1,1,6,"6","5",6 10 | "GP","M",15,"U","LE3","A",3,2,"services","other","home","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,2,2,1,1,1,0,"16","18",19 11 | "GP","M",15,"U","GT3","T",3,4,"other","other","home","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",5,5,1,1,1,5,0,"14","15",15 12 | "GP","F",15,"U","GT3","T",4,4,"teacher","health","reputation","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",3,3,3,1,2,2,0,"10","8",9 13 | "GP","F",15,"U","GT3","T",2,1,"services","other","reputation","father",3,3,0,"no","yes","no","yes","yes","yes","yes","no",5,2,2,1,1,4,4,"10","12",12 14 | "GP","M",15,"U","LE3","T",4,4,"health","services","course","father",1,1,0,"no","yes","yes","yes","yes","yes","yes","no",4,3,3,1,3,5,2,"14","14",14 15 | "GP","M",15,"U","GT3","T",4,3,"teacher","other","course","mother",2,2,0,"no","yes","yes","no","yes","yes","yes","no",5,4,3,1,2,3,2,"10","10",11 16 | "GP","M",15,"U","GT3","A",2,2,"other","other","home","other",1,3,0,"no","yes","no","no","yes","yes","yes","yes",4,5,2,1,1,3,0,"14","16",16 17 | "GP","F",16,"U","GT3","T",4,4,"health","other","home","mother",1,1,0,"no","yes","no","no","yes","yes","yes","no",4,4,4,1,2,2,4,"14","14",14 18 | "GP","F",16,"U","GT3","T",4,4,"services","services","reputation","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","no",3,2,3,1,2,2,6,"13","14",14 19 | "GP","F",16,"U","GT3","T",3,3,"other","other","reputation","mother",3,2,0,"yes","yes","no","yes","yes","yes","no","no",5,3,2,1,1,4,4,"8","10",10 20 | "GP","M",17,"U","GT3","T",3,2,"services","services","course","mother",1,1,3,"no","yes","no","yes","yes","yes","yes","no",5,5,5,2,4,5,16,"6","5",5 21 | "GP","M",16,"U","LE3","T",4,3,"health","other","home","father",1,1,0,"no","no","yes","yes","yes","yes","yes","no",3,1,3,1,3,5,4,"8","10",10 22 | "GP","M",15,"U","GT3","T",4,3,"teacher","other","reputation","mother",1,2,0,"no","no","no","no","yes","yes","yes","no",4,4,1,1,1,1,0,"13","14",15 23 | "GP","M",15,"U","GT3","T",4,4,"health","health","other","father",1,1,0,"no","yes","yes","no","yes","yes","yes","no",5,4,2,1,1,5,0,"12","15",15 24 | "GP","M",16,"U","LE3","T",4,2,"teacher","other","course","mother",1,2,0,"no","no","no","yes","yes","yes","yes","no",4,5,1,1,3,5,2,"15","15",16 25 | "GP","M",16,"U","LE3","T",2,2,"other","other","reputation","mother",2,2,0,"no","yes","no","yes","yes","yes","yes","no",5,4,4,2,4,5,0,"13","13",12 26 | "GP","F",15,"R","GT3","T",2,4,"services","health","course","mother",1,3,0,"yes","yes","yes","yes","yes","yes","yes","no",4,3,2,1,1,5,2,"10","9",8 27 | "GP","F",16,"U","GT3","T",2,2,"services","services","home","mother",1,1,2,"no","yes","yes","no","no","yes","yes","no",1,2,2,1,3,5,14,"6","9",8 28 | "GP","M",15,"U","GT3","T",2,2,"other","other","home","mother",1,1,0,"no","yes","yes","no","yes","yes","yes","no",4,2,2,1,2,5,2,"12","12",11 29 | "GP","M",15,"U","GT3","T",4,2,"health","services","other","mother",1,1,0,"no","no","yes","no","yes","yes","yes","no",2,2,4,2,4,1,4,"15","16",15 30 | "GP","M",16,"U","LE3","A",3,4,"services","other","home","mother",1,2,0,"yes","yes","no","yes","yes","yes","yes","no",5,3,3,1,1,5,4,"11","11",11 31 | "GP","M",16,"U","GT3","T",4,4,"teacher","teacher","home","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","yes",4,4,5,5,5,5,16,"10","12",11 32 | "GP","M",15,"U","GT3","T",4,4,"health","services","home","mother",1,2,0,"no","yes","yes","no","no","yes","yes","no",5,4,2,3,4,5,0,"9","11",12 33 | "GP","M",15,"U","GT3","T",4,4,"services","services","reputation","mother",2,2,0,"no","yes","no","yes","yes","yes","yes","no",4,3,1,1,1,5,0,"17","16",17 34 | "GP","M",15,"R","GT3","T",4,3,"teacher","at_home","course","mother",1,2,0,"no","yes","no","yes","yes","yes","yes","yes",4,5,2,1,1,5,0,"17","16",16 35 | "GP","M",15,"U","LE3","T",3,3,"other","other","course","mother",1,2,0,"no","no","no","yes","no","yes","yes","no",5,3,2,1,1,2,0,"8","10",12 36 | "GP","M",16,"U","GT3","T",3,2,"other","other","home","mother",1,1,0,"no","yes","yes","no","no","yes","yes","no",5,4,3,1,1,5,0,"12","14",15 37 | "GP","F",15,"U","GT3","T",2,3,"other","other","other","father",2,1,0,"no","yes","no","yes","yes","yes","no","no",3,5,1,1,1,5,0,"8","7",6 38 | "GP","M",15,"U","LE3","T",4,3,"teacher","services","home","mother",1,3,0,"no","yes","no","yes","yes","yes","yes","no",5,4,3,1,1,4,2,"15","16",18 39 | "GP","M",16,"R","GT3","A",4,4,"other","teacher","reputation","mother",2,3,0,"no","yes","no","yes","yes","yes","yes","yes",2,4,3,1,1,5,7,"15","16",15 40 | "GP","F",15,"R","GT3","T",3,4,"services","health","course","mother",1,3,0,"yes","yes","yes","yes","yes","yes","yes","no",4,3,2,1,1,5,2,"12","12",11 41 | "GP","F",15,"R","GT3","T",2,2,"at_home","other","reputation","mother",1,1,0,"yes","yes","yes","yes","yes","yes","no","no",4,3,1,1,1,2,8,"14","13",13 42 | "GP","F",16,"U","LE3","T",2,2,"other","other","home","mother",2,2,1,"no","yes","no","yes","no","yes","yes","yes",3,3,3,1,2,3,25,"7","10",11 43 | "GP","M",15,"U","LE3","T",4,4,"teacher","other","home","other",1,1,0,"no","yes","no","no","no","yes","yes","yes",5,4,3,2,4,5,8,"12","12",12 44 | "GP","M",15,"U","GT3","T",4,4,"services","teacher","course","father",1,2,0,"no","yes","no","yes","yes","yes","yes","no",4,3,3,1,1,5,2,"19","18",18 45 | "GP","M",15,"U","GT3","T",2,2,"services","services","course","father",1,1,0,"yes","yes","no","no","yes","yes","yes","no",5,4,1,1,1,1,0,"8","8",11 46 | "GP","F",16,"U","LE3","T",2,2,"other","at_home","course","father",2,2,1,"yes","no","no","yes","yes","yes","yes","no",4,3,3,2,2,5,14,"10","10",9 47 | "GP","F",15,"U","LE3","A",4,3,"other","other","course","mother",1,2,0,"yes","yes","yes","yes","yes","yes","yes","yes",5,2,2,1,1,5,8,"8","8",6 48 | "GP","F",16,"U","LE3","A",3,3,"other","services","home","mother",1,2,0,"no","yes","no","no","yes","yes","yes","no",2,3,5,1,4,3,12,"11","12",11 49 | "GP","M",16,"U","GT3","T",4,3,"health","services","reputation","mother",1,4,0,"no","no","no","yes","yes","yes","yes","no",4,2,2,1,1,2,4,"19","19",20 50 | "GP","M",15,"U","GT3","T",4,2,"teacher","other","home","mother",1,2,0,"no","yes","yes","no","yes","yes","no","no",4,3,3,2,2,5,2,"15","15",14 51 | "GP","F",15,"U","GT3","T",4,4,"services","teacher","other","father",1,2,1,"yes","yes","no","yes","no","yes","yes","no",4,4,4,1,1,3,2,"7","7",7 52 | "GP","F",16,"U","LE3","T",2,2,"services","services","course","mother",3,2,0,"no","yes","yes","no","yes","yes","yes","no",4,3,3,2,3,4,2,"12","13",13 53 | "GP","F",15,"U","LE3","T",4,2,"health","other","other","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,3,3,1,1,5,2,"11","13",13 54 | "GP","M",15,"U","LE3","A",4,2,"health","health","other","father",2,1,1,"no","no","no","no","yes","yes","no","no",5,5,5,3,4,5,6,"11","11",10 55 | "GP","F",15,"U","GT3","T",4,4,"services","services","course","mother",1,1,0,"yes","yes","yes","no","yes","yes","yes","no",3,3,4,2,3,5,0,"8","10",11 56 | "GP","F",15,"U","LE3","A",3,3,"other","other","other","mother",1,1,0,"no","no","yes","no","yes","yes","yes","no",5,3,4,4,4,1,6,"10","13",13 57 | "GP","F",16,"U","GT3","A",2,1,"other","other","other","mother",1,2,0,"no","no","yes","yes","yes","yes","yes","yes",5,3,4,1,1,2,8,"8","9",10 58 | "GP","F",15,"U","GT3","A",4,3,"services","services","reputation","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,3,2,1,1,1,0,"14","15",15 59 | "GP","M",15,"U","GT3","T",4,4,"teacher","health","reputation","mother",1,2,0,"no","yes","no","yes","yes","yes","no","no",3,2,2,1,1,5,4,"14","15",15 60 | "GP","M",15,"U","LE3","T",1,2,"other","at_home","home","father",1,2,0,"yes","yes","no","yes","yes","yes","yes","no",4,3,2,1,1,5,2,"9","10",9 61 | "GP","F",16,"U","GT3","T",4,2,"services","other","course","mother",1,2,0,"no","yes","no","no","yes","yes","yes","no",4,2,3,1,1,5,2,"15","16",16 62 | "GP","F",16,"R","GT3","T",4,4,"health","teacher","other","mother",1,2,0,"no","yes","no","yes","yes","yes","no","no",2,4,4,2,3,4,6,"10","11",11 63 | "GP","F",16,"U","GT3","T",1,1,"services","services","course","father",4,1,0,"yes","yes","no","yes","no","yes","yes","yes",5,5,5,5,5,5,6,"10","8",11 64 | "GP","F",16,"U","LE3","T",1,2,"other","services","reputation","father",1,2,0,"yes","no","no","yes","yes","yes","yes","no",4,4,3,1,1,1,4,"8","10",9 65 | "GP","F",16,"U","GT3","T",4,3,"teacher","health","home","mother",1,3,0,"yes","yes","yes","yes","yes","yes","yes","no",3,4,4,2,4,4,2,"10","9",9 66 | "GP","F",15,"U","LE3","T",4,3,"services","services","reputation","father",1,2,0,"yes","no","no","yes","yes","yes","yes","yes",4,4,4,2,4,2,0,"10","10",10 67 | "GP","F",16,"U","LE3","T",4,3,"teacher","services","course","mother",3,2,0,"no","yes","no","yes","yes","yes","yes","no",5,4,3,1,2,1,2,"16","15",15 68 | "GP","M",15,"U","GT3","A",4,4,"other","services","reputation","mother",1,4,0,"no","yes","no","yes","no","yes","yes","yes",1,3,3,5,5,3,4,"13","13",12 69 | "GP","F",16,"U","GT3","T",3,1,"services","other","course","mother",1,4,0,"yes","yes","yes","no","yes","yes","yes","no",4,3,3,1,2,5,4,"7","7",6 70 | "GP","F",15,"R","LE3","T",2,2,"health","services","reputation","mother",2,2,0,"yes","yes","yes","no","yes","yes","yes","no",4,1,3,1,3,4,2,"8","9",8 71 | "GP","F",15,"R","LE3","T",3,1,"other","other","reputation","father",2,4,0,"no","yes","no","no","no","yes","yes","no",4,4,2,2,3,3,12,"16","16",16 72 | "GP","M",16,"U","GT3","T",3,1,"other","other","reputation","father",2,4,0,"no","yes","yes","no","yes","yes","yes","no",4,3,2,1,1,5,0,"13","15",15 73 | "GP","M",15,"U","GT3","T",4,2,"other","other","course","mother",1,4,0,"no","no","no","no","yes","yes","yes","no",3,3,3,1,1,3,0,"10","10",10 74 | "GP","F",15,"R","GT3","T",1,1,"other","other","reputation","mother",1,2,2,"yes","yes","no","no","no","yes","yes","yes",3,3,4,2,4,5,2,"8","6",5 75 | "GP","M",16,"U","GT3","T",3,1,"other","other","reputation","mother",1,1,0,"no","no","no","yes","yes","yes","no","no",5,3,2,2,2,5,2,"12","12",14 76 | "GP","F",16,"U","GT3","T",3,3,"other","services","home","mother",1,2,0,"yes","yes","yes","yes","yes","yes","yes","no",4,3,3,2,4,5,54,"11","12",11 77 | "GP","M",15,"U","GT3","T",4,3,"teacher","other","home","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,3,3,2,3,5,6,"9","9",10 78 | "GP","M",15,"U","GT3","T",4,0,"teacher","other","course","mother",2,4,0,"no","no","no","yes","yes","yes","yes","no",3,4,3,1,1,1,8,"11","11",10 79 | "GP","F",16,"U","GT3","T",2,2,"other","other","reputation","mother",1,4,0,"no","no","yes","no","yes","yes","yes","yes",5,2,3,1,3,3,0,"11","11",11 80 | "GP","M",17,"U","GT3","T",2,1,"other","other","home","mother",2,1,3,"yes","yes","no","yes","yes","no","yes","no",4,5,1,1,1,3,2,"8","8",10 81 | "GP","F",16,"U","GT3","T",3,4,"at_home","other","course","mother",1,2,0,"no","yes","no","no","yes","yes","yes","no",2,4,3,1,2,3,12,"5","5",5 82 | "GP","M",15,"U","GT3","T",2,3,"other","services","course","father",1,1,0,"yes","yes","yes","yes","no","yes","yes","yes",3,2,2,1,3,3,2,"10","12",12 83 | "GP","M",15,"U","GT3","T",2,3,"other","other","home","mother",1,3,0,"yes","no","yes","no","no","yes","yes","no",5,3,2,1,2,5,4,"11","10",11 84 | "GP","F",15,"U","LE3","T",3,2,"services","other","reputation","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,4,4,1,1,5,10,"7","6",6 85 | "GP","M",15,"U","LE3","T",2,2,"services","services","home","mother",2,2,0,"no","no","yes","yes","yes","yes","yes","no",5,3,3,1,3,4,4,"15","15",15 86 | "GP","F",15,"U","GT3","T",1,1,"other","other","home","father",1,2,0,"no","yes","no","yes","no","yes","yes","no",4,3,2,2,3,4,2,"9","10",10 87 | "GP","F",15,"U","GT3","T",4,4,"services","services","reputation","father",2,2,2,"no","no","yes","no","yes","yes","yes","yes",4,4,4,2,3,5,6,"7","9",8 88 | "GP","F",16,"U","LE3","T",2,2,"at_home","other","course","mother",1,2,0,"no","yes","no","no","yes","yes","no","no",4,3,4,1,2,2,4,"8","7",6 89 | "GP","F",15,"U","GT3","T",4,2,"other","other","reputation","mother",1,3,0,"no","yes","no","yes","yes","yes","yes","no",5,3,3,1,3,1,4,"13","14",14 90 | "GP","M",16,"U","GT3","T",2,2,"services","other","reputation","father",2,2,1,"no","no","yes","yes","no","yes","yes","no",4,4,2,1,1,3,12,"11","10",10 91 | "GP","M",16,"U","LE3","A",4,4,"teacher","health","reputation","mother",1,2,0,"no","yes","no","no","yes","yes","no","no",4,1,3,3,5,5,18,"8","6",7 92 | "GP","F",16,"U","GT3","T",3,3,"other","other","home","mother",1,3,0,"no","yes","yes","no","yes","yes","yes","yes",4,3,3,1,3,4,0,"7","7",8 93 | "GP","F",15,"U","GT3","T",4,3,"services","other","reputation","mother",1,1,0,"no","no","yes","yes","yes","yes","yes","no",4,5,5,1,3,1,4,"16","17",18 94 | "GP","F",16,"U","LE3","T",3,1,"other","other","home","father",1,2,0,"yes","yes","no","no","yes","yes","no","no",3,3,3,2,3,2,4,"7","6",6 95 | "GP","F",16,"U","GT3","T",4,2,"teacher","services","home","mother",2,2,0,"no","yes","yes","yes","yes","yes","yes","no",5,3,3,1,1,1,0,"11","10",10 96 | "GP","M",15,"U","LE3","T",2,2,"services","health","reputation","mother",1,4,0,"no","yes","no","yes","yes","yes","yes","no",4,3,4,1,1,4,6,"11","13",14 97 | "GP","F",15,"R","GT3","T",1,1,"at_home","other","home","mother",2,4,1,"yes","yes","yes","yes","yes","yes","yes","no",3,1,2,1,1,1,2,"7","10",10 98 | "GP","M",16,"R","GT3","T",4,3,"services","other","reputation","mother",2,1,0,"yes","yes","no","yes","no","yes","yes","no",3,3,3,1,1,4,2,"11","15",15 99 | "GP","F",16,"U","GT3","T",2,1,"other","other","course","mother",1,2,0,"no","yes","yes","no","yes","yes","no","yes",4,3,5,1,1,5,2,"8","9",10 100 | "GP","F",16,"U","GT3","T",4,4,"other","other","reputation","mother",1,1,0,"no","no","no","yes","no","yes","yes","no",5,3,4,1,2,1,6,"11","14",14 101 | "GP","F",16,"U","GT3","T",4,3,"other","at_home","course","mother",1,3,0,"yes","yes","yes","no","yes","yes","yes","no",5,3,5,1,1,3,0,"7","9",8 102 | "GP","M",16,"U","GT3","T",4,4,"services","services","other","mother",1,1,0,"yes","yes","yes","yes","yes","yes","yes","no",4,5,5,5,5,4,14,"7","7",5 103 | "GP","M",16,"U","GT3","T",4,4,"services","teacher","other","father",1,3,0,"no","yes","no","yes","yes","yes","yes","yes",4,4,3,1,1,4,0,"16","17",17 104 | "GP","M",15,"U","GT3","T",4,4,"services","other","course","mother",1,1,0,"no","yes","no","yes","no","yes","yes","no",5,3,3,1,1,5,4,"10","13",14 105 | "GP","F",15,"U","GT3","T",3,2,"services","other","home","mother",2,2,0,"yes","yes","yes","no","yes","yes","yes","no",4,3,5,1,1,2,26,"7","6",6 106 | "GP","M",15,"U","GT3","A",3,4,"services","other","course","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",5,4,4,1,1,1,0,"16","18",18 107 | "GP","F",15,"U","GT3","A",3,3,"other","health","reputation","father",1,4,0,"yes","no","no","no","yes","yes","no","no",4,3,3,1,1,4,10,"10","11",11 108 | "GP","F",15,"U","GT3","T",2,2,"other","other","course","mother",1,4,0,"yes","yes","yes","no","yes","yes","yes","no",5,1,2,1,1,3,8,"7","8",8 109 | "GP","M",16,"U","GT3","T",3,3,"services","other","home","father",1,3,0,"no","yes","no","yes","yes","yes","yes","no",5,3,3,1,1,5,2,"16","18",18 110 | "GP","M",15,"R","GT3","T",4,4,"other","other","home","father",4,4,0,"no","yes","yes","yes","yes","yes","yes","yes",1,3,5,3,5,1,6,"10","13",13 111 | "GP","F",16,"U","LE3","T",4,4,"health","health","other","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","yes",5,4,5,1,1,4,4,"14","15",16 112 | "GP","M",15,"U","LE3","A",4,4,"teacher","teacher","course","mother",1,1,0,"no","no","no","yes","yes","yes","yes","no",5,5,3,1,1,4,6,"18","19",19 113 | "GP","F",16,"R","GT3","T",3,3,"services","other","reputation","father",1,3,1,"yes","yes","no","yes","yes","yes","yes","no",4,1,2,1,1,2,0,"7","10",10 114 | "GP","F",16,"U","GT3","T",2,2,"at_home","other","home","mother",1,2,1,"yes","no","no","yes","yes","yes","yes","no",3,1,2,1,1,5,6,"10","13",13 115 | "GP","M",15,"U","LE3","T",4,2,"teacher","other","course","mother",1,1,0,"no","no","no","no","yes","yes","yes","no",3,5,2,1,1,3,10,"18","19",19 116 | "GP","M",15,"R","GT3","T",2,1,"health","services","reputation","mother",1,2,0,"no","no","no","yes","yes","yes","yes","yes",5,4,2,1,1,5,8,"9","9",9 117 | "GP","M",16,"U","GT3","T",4,4,"teacher","teacher","course","father",1,2,0,"no","yes","no","yes","yes","yes","yes","no",5,4,4,1,2,5,2,"15","15",16 118 | "GP","M",15,"U","GT3","T",4,4,"other","teacher","reputation","father",2,2,0,"no","yes","no","yes","yes","yes","no","no",4,4,3,1,1,2,2,"11","13",14 119 | "GP","M",16,"U","GT3","T",3,3,"other","services","home","father",2,1,0,"no","no","no","yes","yes","yes","yes","no",5,4,2,1,1,5,0,"13","14",13 120 | "GP","M",17,"R","GT3","T",1,3,"other","other","course","father",3,2,1,"no","yes","no","yes","yes","yes","yes","no",5,2,4,1,4,5,20,"9","7",8 121 | "GP","M",15,"U","GT3","T",3,4,"other","other","reputation","father",1,1,0,"no","no","no","no","yes","yes","yes","no",3,4,3,1,2,4,6,"14","13",13 122 | "GP","F",15,"U","GT3","T",1,2,"at_home","services","course","mother",1,2,0,"no","no","no","no","no","yes","yes","no",3,2,3,1,2,1,2,"16","15",15 123 | "GP","M",15,"U","GT3","T",2,2,"services","services","home","father",1,4,0,"no","yes","yes","yes","yes","yes","yes","no",5,5,4,1,2,5,6,"16","14",15 124 | "GP","F",16,"U","LE3","T",2,4,"other","health","course","father",2,2,0,"no","yes","yes","yes","yes","yes","yes","yes",4,2,2,1,2,5,2,"13","13",13 125 | "GP","M",16,"U","GT3","T",4,4,"health","other","course","mother",1,1,0,"no","yes","no","yes","yes","yes","yes","no",3,4,4,1,4,5,18,"14","11",13 126 | "GP","F",16,"U","GT3","T",2,2,"other","other","home","mother",1,2,0,"no","no","yes","no","yes","yes","yes","yes",5,4,4,1,1,5,0,"8","7",8 127 | "GP","M",15,"U","GT3","T",3,4,"services","services","home","father",1,1,0,"yes","no","no","no","yes","yes","yes","no",5,5,5,3,2,5,0,"13","13",12 128 | "GP","F",15,"U","LE3","A",3,4,"other","other","home","mother",1,2,0,"yes","no","no","yes","yes","yes","yes","yes",5,3,2,1,1,1,0,"7","10",11 129 | "GP","F",19,"U","GT3","T",0,1,"at_home","other","course","other",1,2,3,"no","yes","no","no","no","no","no","no",3,4,2,1,1,5,2,"7","8",9 130 | "GP","M",18,"R","GT3","T",2,2,"services","other","reputation","mother",1,1,2,"no","yes","no","yes","yes","yes","yes","no",3,3,3,1,2,4,0,"7","4",0 131 | "GP","M",16,"R","GT3","T",4,4,"teacher","teacher","course","mother",1,1,0,"no","no","yes","yes","yes","yes","yes","no",3,5,5,2,5,4,8,"18","18",18 132 | "GP","F",15,"R","GT3","T",3,4,"services","teacher","course","father",2,3,2,"no","yes","no","no","yes","yes","yes","yes",4,2,2,2,2,5,0,"12","0",0 133 | "GP","F",15,"U","GT3","T",1,1,"at_home","other","course","mother",3,1,0,"no","yes","no","yes","no","yes","yes","yes",4,3,3,1,2,4,0,"8","0",0 134 | "GP","F",17,"U","LE3","T",2,2,"other","other","course","father",1,1,0,"no","yes","no","no","yes","yes","yes","yes",3,4,4,1,3,5,12,"10","13",12 135 | "GP","F",16,"U","GT3","A",3,4,"services","other","course","father",1,1,0,"no","no","no","no","yes","yes","yes","no",3,2,1,1,4,5,16,"12","11",11 136 | "GP","M",15,"R","GT3","T",3,4,"at_home","teacher","course","mother",4,2,0,"no","yes","no","no","yes","yes","no","yes",5,3,3,1,1,5,0,"9","0",0 137 | "GP","F",15,"U","GT3","T",4,4,"services","at_home","course","mother",1,3,0,"no","yes","no","yes","yes","yes","yes","yes",4,3,3,1,1,5,0,"11","0",0 138 | "GP","M",17,"R","GT3","T",3,4,"at_home","other","course","mother",3,2,0,"no","no","no","no","yes","yes","no","no",5,4,5,2,4,5,0,"10","0",0 139 | "GP","F",16,"U","GT3","A",3,3,"other","other","course","other",2,1,2,"no","yes","no","yes","no","yes","yes","yes",4,3,2,1,1,5,0,"4","0",0 140 | "GP","M",16,"U","LE3","T",1,1,"services","other","course","mother",1,2,1,"no","no","no","no","yes","yes","no","yes",4,4,4,1,3,5,0,"14","12",12 141 | "GP","F",15,"U","GT3","T",4,4,"teacher","teacher","course","mother",2,1,0,"no","no","no","yes","yes","yes","yes","no",4,3,2,1,1,5,0,"16","16",15 142 | "GP","M",15,"U","GT3","T",4,3,"teacher","services","course","father",2,4,0,"yes","yes","no","no","yes","yes","yes","no",2,2,2,1,1,3,0,"7","9",0 143 | "GP","M",16,"U","LE3","T",2,2,"services","services","reputation","father",2,1,2,"no","yes","no","yes","yes","yes","yes","no",2,3,3,2,2,2,8,"9","9",9 144 | "GP","F",15,"U","GT3","T",4,4,"teacher","services","course","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","no",4,2,2,1,1,5,2,"9","11",11 145 | "GP","F",16,"U","LE3","T",1,1,"at_home","at_home","course","mother",1,1,0,"no","no","no","no","yes","yes","yes","no",3,4,4,3,3,1,2,"14","14",13 146 | "GP","M",17,"U","GT3","T",2,1,"other","other","home","mother",1,1,3,"no","yes","no","no","yes","yes","yes","no",5,4,5,1,2,5,0,"5","0",0 147 | "GP","F",15,"U","GT3","T",1,1,"other","services","course","father",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,4,2,1,2,5,0,"8","11",11 148 | "GP","F",15,"U","GT3","T",3,2,"health","services","home","father",1,2,3,"no","yes","no","no","yes","yes","yes","no",3,3,2,1,1,3,0,"6","7",0 149 | "GP","F",15,"U","GT3","T",1,2,"at_home","other","course","mother",1,2,0,"no","yes","yes","no","no","yes","yes","no",4,3,2,1,1,5,2,"10","11",11 150 | "GP","M",16,"U","GT3","T",4,4,"teacher","teacher","course","mother",1,1,0,"no","yes","no","no","yes","no","yes","yes",3,3,2,2,1,5,0,"7","6",0 151 | "GP","M",15,"U","LE3","A",2,1,"services","other","course","mother",4,1,3,"no","no","no","no","yes","yes","yes","no",4,5,5,2,5,5,0,"8","9",10 152 | "GP","M",18,"U","LE3","T",1,1,"other","other","course","mother",1,1,3,"no","no","no","no","yes","no","yes","yes",2,3,5,2,5,4,0,"6","5",0 153 | "GP","M",16,"U","LE3","T",2,1,"at_home","other","course","mother",1,1,1,"no","no","no","yes","yes","yes","no","yes",4,4,4,3,5,5,6,"12","13",14 154 | "GP","F",15,"R","GT3","T",3,3,"services","services","reputation","other",2,3,2,"no","yes","yes","yes","yes","yes","yes","yes",4,2,1,2,3,3,8,"10","10",10 155 | "GP","M",19,"U","GT3","T",3,2,"services","at_home","home","mother",1,1,3,"no","yes","no","no","yes","no","yes","yes",4,5,4,1,1,4,0,"5","0",0 156 | "GP","F",17,"U","GT3","T",4,4,"other","teacher","course","mother",1,1,0,"yes","yes","no","no","yes","yes","no","yes",4,2,1,1,1,4,0,"11","11",12 157 | "GP","M",15,"R","GT3","T",2,3,"at_home","services","course","mother",1,2,0,"yes","no","yes","yes","yes","yes","no","no",4,4,4,1,1,1,2,"11","8",8 158 | "GP","M",17,"R","LE3","T",1,2,"other","other","reputation","mother",1,1,0,"no","no","no","no","yes","yes","no","no",2,2,2,3,3,5,8,"16","12",13 159 | "GP","F",18,"R","GT3","T",1,1,"at_home","other","course","mother",3,1,3,"no","yes","no","yes","no","yes","no","no",5,2,5,1,5,4,6,"9","8",10 160 | "GP","M",16,"R","GT3","T",2,2,"at_home","other","course","mother",3,1,0,"no","no","no","no","no","yes","no","no",4,2,2,1,2,3,2,"17","15",15 161 | "GP","M",16,"U","GT3","T",3,3,"other","services","course","father",1,2,1,"no","yes","yes","no","yes","yes","yes","yes",4,5,5,4,4,5,4,"10","12",12 162 | "GP","M",17,"R","LE3","T",2,1,"at_home","other","course","mother",2,1,2,"no","no","no","yes","yes","no","yes","yes",3,3,2,2,2,5,0,"7","6",0 163 | "GP","M",15,"R","GT3","T",3,2,"other","other","course","mother",2,2,2,"yes","yes","no","no","yes","yes","yes","yes",4,4,4,1,4,3,6,"5","9",7 164 | "GP","M",16,"U","LE3","T",1,2,"other","other","course","mother",2,1,1,"no","no","no","yes","yes","yes","no","no",4,4,4,2,4,5,0,"7","0",0 165 | "GP","M",17,"U","GT3","T",1,3,"at_home","services","course","father",1,1,0,"no","no","no","no","yes","no","yes","no",5,3,3,1,4,2,2,"10","10",10 166 | "GP","M",17,"R","LE3","T",1,1,"other","services","course","mother",4,2,3,"no","no","no","yes","yes","no","no","yes",5,3,5,1,5,5,0,"5","8",7 167 | "GP","M",16,"U","GT3","T",3,2,"services","services","course","mother",2,1,1,"no","yes","no","yes","no","no","no","no",4,5,2,1,1,2,16,"12","11",12 168 | "GP","M",16,"U","GT3","T",2,2,"other","other","course","father",1,2,0,"no","no","no","no","yes","no","yes","no",4,3,5,2,4,4,4,"10","10",10 169 | "GP","F",16,"U","GT3","T",4,2,"health","services","home","father",1,2,0,"no","no","yes","no","yes","yes","yes","yes",4,2,3,1,1,3,0,"14","15",16 170 | "GP","F",16,"U","GT3","T",2,2,"other","other","home","mother",1,2,0,"no","yes","yes","no","no","yes","yes","no",5,1,5,1,1,4,0,"6","7",0 171 | "GP","F",16,"U","GT3","T",4,4,"health","health","reputation","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","yes",4,4,2,1,1,3,0,"14","14",14 172 | "GP","M",16,"U","GT3","T",3,4,"other","other","course","father",3,1,2,"no","yes","no","yes","no","yes","yes","no",3,4,5,2,4,2,0,"6","5",0 173 | "GP","M",16,"U","GT3","T",1,0,"other","other","reputation","mother",2,2,0,"no","yes","yes","yes","yes","yes","yes","yes",4,3,2,1,1,3,2,"13","15",16 174 | "GP","M",17,"U","LE3","T",4,4,"teacher","other","reputation","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,4,4,1,3,5,0,"13","11",10 175 | "GP","F",16,"U","GT3","T",1,3,"at_home","services","home","mother",1,2,3,"no","no","no","yes","no","yes","yes","yes",4,3,5,1,1,3,0,"8","7",0 176 | "GP","F",16,"U","LE3","T",3,3,"other","other","reputation","mother",2,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,4,5,1,1,4,4,"10","11",9 177 | "GP","M",17,"U","LE3","T",4,3,"teacher","other","course","mother",2,2,0,"no","no","yes","yes","yes","yes","yes","no",4,4,4,4,4,4,4,"10","9",9 178 | "GP","F",16,"U","GT3","T",2,2,"services","other","reputation","mother",2,2,0,"no","no","yes","yes","no","yes","yes","no",3,4,4,1,4,5,2,"13","13",11 179 | "GP","M",17,"U","GT3","T",3,3,"other","other","reputation","father",1,2,0,"no","no","no","yes","no","yes","yes","no",4,3,4,1,4,4,4,"6","5",6 180 | "GP","M",16,"R","GT3","T",4,2,"teacher","services","other","mother",1,1,0,"no","yes","no","yes","yes","yes","yes","yes",4,3,3,3,4,3,10,"10","8",9 181 | "GP","M",17,"U","GT3","T",4,3,"other","other","course","mother",1,2,0,"no","yes","no","yes","yes","yes","yes","yes",5,2,3,1,1,2,4,"10","10",11 182 | "GP","M",16,"U","GT3","T",4,3,"teacher","other","home","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",3,4,3,2,3,3,10,"9","8",8 183 | "GP","M",16,"U","GT3","T",3,3,"services","other","home","mother",1,2,0,"no","no","yes","yes","yes","yes","yes","yes",4,2,3,1,2,3,2,"12","13",12 184 | "GP","F",17,"U","GT3","T",2,4,"services","services","reputation","father",1,2,0,"no","yes","no","yes","yes","yes","no","no",5,4,2,2,3,5,0,"16","17",17 185 | "GP","F",17,"U","LE3","T",3,3,"other","other","reputation","mother",1,2,0,"no","yes","no","yes","yes","yes","yes","yes",5,3,3,2,3,1,56,"9","9",8 186 | "GP","F",16,"U","GT3","T",3,2,"other","other","reputation","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",1,2,2,1,2,1,14,"12","13",12 187 | "GP","M",17,"U","GT3","T",3,3,"services","services","other","mother",1,2,0,"no","yes","no","yes","yes","yes","yes","yes",4,3,4,2,3,4,12,"12","12",11 188 | "GP","M",16,"U","GT3","T",1,2,"services","services","other","mother",1,1,0,"no","yes","yes","yes","yes","yes","yes","yes",3,3,3,1,2,3,2,"11","12",11 189 | "GP","M",16,"U","LE3","T",2,1,"other","other","course","mother",1,2,0,"no","no","yes","yes","yes","yes","yes","yes",4,2,3,1,2,5,0,"15","15",15 190 | "GP","F",17,"U","GT3","A",3,3,"health","other","reputation","mother",1,2,0,"no","yes","no","no","no","yes","yes","yes",3,3,3,1,3,3,6,"8","7",9 191 | "GP","M",17,"R","GT3","T",1,2,"at_home","other","home","mother",1,2,0,"no","no","no","no","yes","yes","no","no",3,1,3,1,5,3,4,"8","9",10 192 | "GP","F",16,"U","GT3","T",2,3,"services","services","course","mother",1,2,0,"no","no","no","no","yes","yes","yes","no",4,3,3,1,1,2,10,"11","12",13 193 | "GP","F",17,"U","GT3","T",1,1,"at_home","services","course","mother",1,2,0,"no","no","no","yes","yes","yes","yes","no",5,3,3,1,1,3,0,"8","8",9 194 | "GP","M",17,"U","GT3","T",1,2,"at_home","services","other","other",2,2,0,"no","no","yes","yes","no","yes","yes","no",4,4,4,4,5,5,12,"7","8",8 195 | "GP","M",16,"R","GT3","T",3,3,"services","services","reputation","mother",1,1,0,"no","yes","no","yes","yes","yes","yes","no",4,3,2,3,4,5,8,"8","9",10 196 | "GP","M",16,"U","GT3","T",2,3,"other","other","home","father",2,1,0,"no","no","no","no","yes","yes","yes","no",5,3,3,1,1,3,0,"13","14",14 197 | "GP","F",17,"U","LE3","T",2,4,"services","services","course","father",1,2,0,"no","no","no","yes","yes","yes","yes","yes",4,3,2,1,1,5,0,"14","15",15 198 | "GP","M",17,"U","GT3","T",4,4,"services","teacher","home","mother",1,1,0,"no","no","no","no","yes","yes","yes","no",5,2,3,1,2,5,4,"17","15",16 199 | "GP","M",16,"R","LE3","T",3,3,"teacher","other","home","father",3,1,0,"no","yes","yes","yes","yes","yes","yes","no",3,3,4,3,5,3,8,"9","9",10 200 | "GP","F",17,"U","GT3","T",4,4,"services","teacher","home","mother",2,1,1,"no","yes","no","no","yes","yes","yes","no",4,2,4,2,3,2,24,"18","18",18 201 | "GP","F",16,"U","LE3","T",4,4,"teacher","teacher","reputation","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,5,2,1,2,3,0,"9","9",10 202 | "GP","F",16,"U","GT3","T",4,3,"health","other","home","mother",1,2,0,"no","yes","no","yes","yes","yes","yes","no",4,3,5,1,5,2,2,"16","16",16 203 | "GP","F",16,"U","GT3","T",2,3,"other","other","reputation","mother",1,2,0,"yes","yes","yes","yes","yes","yes","no","no",4,4,3,1,3,4,6,"8","10",10 204 | "GP","F",17,"U","GT3","T",1,1,"other","other","course","mother",1,2,0,"no","yes","yes","no","no","yes","no","no",4,4,4,1,3,1,4,"9","9",10 205 | "GP","F",17,"R","GT3","T",2,2,"other","other","reputation","mother",1,1,0,"no","yes","no","no","yes","yes","yes","no",5,3,2,1,2,3,18,"7","6",6 206 | "GP","F",16,"R","GT3","T",2,2,"services","services","reputation","mother",2,4,0,"no","yes","yes","yes","no","yes","yes","no",5,3,5,1,1,5,6,"10","10",11 207 | "GP","F",17,"U","GT3","T",3,4,"at_home","services","home","mother",1,3,1,"no","yes","yes","no","yes","yes","yes","yes",4,4,3,3,4,5,28,"10","9",9 208 | "GP","F",16,"U","GT3","A",3,1,"services","other","course","mother",1,2,3,"no","yes","yes","no","yes","yes","yes","no",2,3,3,2,2,4,5,"7","7",7 209 | "GP","F",16,"U","GT3","T",4,3,"teacher","other","other","mother",1,2,0,"no","no","yes","yes","yes","yes","yes","yes",1,3,2,1,1,1,10,"11","12",13 210 | "GP","F",16,"U","GT3","T",1,1,"at_home","other","home","mother",2,1,0,"no","yes","yes","no","yes","yes","no","no",4,3,2,1,4,5,6,"9","9",10 211 | "GP","F",17,"R","GT3","T",4,3,"teacher","other","reputation","mother",2,3,0,"no","yes","yes","yes","yes","yes","yes","yes",4,4,2,1,1,4,6,"7","7",7 212 | "GP","F",19,"U","GT3","T",3,3,"other","other","reputation","other",1,4,0,"no","yes","yes","yes","yes","yes","yes","no",4,3,3,1,2,3,10,"8","8",8 213 | "GP","M",17,"U","LE3","T",4,4,"services","other","home","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","yes",5,3,5,4,5,3,13,"12","12",13 214 | "GP","F",16,"U","GT3","A",2,2,"other","other","reputation","mother",1,2,0,"yes","yes","yes","no","yes","yes","yes","no",3,3,4,1,1,4,0,"12","13",14 215 | "GP","M",18,"U","GT3","T",2,2,"services","other","home","mother",1,2,1,"no","yes","yes","yes","yes","yes","yes","no",4,4,4,2,4,5,15,"6","7",8 216 | "GP","F",17,"R","LE3","T",4,4,"services","other","other","mother",1,1,0,"no","yes","yes","no","yes","yes","no","no",5,2,1,1,2,3,12,"8","10",10 217 | "GP","F",17,"U","LE3","T",3,2,"other","other","reputation","mother",2,2,0,"no","no","yes","no","yes","yes","yes","no",4,4,4,1,3,1,2,"14","15",15 218 | "GP","F",17,"U","GT3","T",4,3,"other","other","reputation","mother",1,2,2,"no","no","yes","no","yes","yes","yes","yes",3,4,5,2,4,1,22,"6","6",4 219 | "GP","M",18,"U","LE3","T",3,3,"services","health","home","father",1,2,1,"no","yes","yes","no","yes","yes","yes","no",3,2,4,2,4,4,13,"6","6",8 220 | "GP","F",17,"U","GT3","T",2,3,"at_home","other","home","father",2,1,0,"no","yes","yes","no","yes","yes","no","no",3,3,3,1,4,3,3,"7","7",8 221 | "GP","F",17,"U","GT3","T",2,2,"at_home","at_home","course","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","no",4,3,3,1,1,4,4,"9","10",10 222 | "GP","F",17,"R","GT3","T",2,1,"at_home","services","reputation","mother",2,2,0,"no","yes","no","yes","yes","yes","yes","no",4,2,5,1,2,5,2,"6","6",6 223 | "GP","F",17,"U","GT3","T",1,1,"at_home","other","reputation","mother",1,3,1,"no","yes","no","yes","yes","yes","no","yes",4,3,4,1,1,5,0,"6","5",0 224 | "GP","F",16,"U","GT3","T",2,3,"services","teacher","other","mother",1,2,0,"yes","no","no","no","yes","yes","yes","no",2,3,1,1,1,3,2,"16","16",17 225 | "GP","M",18,"U","GT3","T",2,2,"other","other","home","mother",2,2,0,"no","yes","yes","no","yes","yes","yes","no",3,3,3,5,5,4,0,"12","13",13 226 | "GP","F",16,"U","GT3","T",4,4,"teacher","services","home","mother",1,3,0,"no","yes","no","yes","no","yes","yes","no",5,3,2,1,1,5,0,"13","13",14 227 | "GP","F",18,"R","GT3","T",3,1,"other","other","reputation","mother",1,2,1,"no","no","no","yes","yes","yes","yes","yes",5,3,3,1,1,4,16,"9","8",7 228 | "GP","F",17,"U","GT3","T",3,2,"other","other","course","mother",1,2,0,"no","no","no","yes","no","yes","yes","no",5,3,4,1,3,3,10,"16","15",15 229 | "GP","M",17,"U","LE3","T",2,3,"services","services","reputation","father",1,2,0,"no","yes","yes","no","no","yes","yes","no",5,3,3,1,3,3,2,"12","11",12 230 | "GP","M",18,"U","LE3","T",2,1,"at_home","other","course","mother",4,2,0,"yes","yes","yes","yes","yes","yes","yes","yes",4,3,2,4,5,3,14,"10","8",9 231 | "GP","F",17,"U","GT3","A",2,1,"other","other","course","mother",2,3,0,"no","no","no","yes","yes","yes","yes","yes",3,2,3,1,2,3,10,"12","10",12 232 | "GP","F",17,"U","LE3","T",4,3,"health","other","reputation","father",1,2,0,"no","no","no","yes","yes","yes","yes","yes",3,2,3,1,2,3,14,"13","13",14 233 | "GP","M",17,"R","GT3","T",2,2,"other","other","course","father",2,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,5,2,1,1,1,4,"11","11",11 234 | "GP","M",17,"U","GT3","T",4,4,"teacher","teacher","reputation","mother",1,2,0,"yes","yes","no","yes","yes","yes","yes","yes",4,5,5,1,3,2,14,"11","9",9 235 | "GP","M",16,"U","GT3","T",4,4,"health","other","reputation","father",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,2,4,2,4,1,2,"14","13",13 236 | "GP","M",16,"U","LE3","T",1,1,"other","other","home","mother",2,2,0,"no","yes","yes","no","yes","yes","yes","no",3,4,2,1,1,5,18,"9","7",6 237 | "GP","M",16,"U","GT3","T",3,2,"at_home","other","reputation","mother",2,3,0,"no","no","no","yes","yes","yes","yes","yes",5,3,3,1,3,2,10,"11","9",10 238 | "GP","M",17,"U","LE3","T",2,2,"other","other","home","father",1,2,0,"no","no","yes","yes","no","yes","yes","yes",4,4,2,5,5,4,4,"14","13",13 239 | "GP","F",16,"U","GT3","T",2,1,"other","other","home","mother",1,1,0,"no","no","no","no","yes","yes","yes","yes",4,5,2,1,1,5,20,"13","12",12 240 | "GP","F",17,"R","GT3","T",2,1,"at_home","services","course","mother",3,2,0,"no","no","no","yes","yes","yes","no","no",2,1,1,1,1,3,2,"13","11",11 241 | "GP","M",18,"U","GT3","T",2,2,"other","services","reputation","father",1,2,1,"no","no","no","no","yes","no","yes","no",5,5,4,3,5,2,0,"7","7",0 242 | "GP","M",17,"U","LE3","T",4,3,"health","other","course","mother",2,2,0,"no","no","no","yes","yes","yes","yes","yes",2,5,5,1,4,5,14,"12","12",12 243 | "GP","M",17,"R","LE3","A",4,4,"teacher","other","course","mother",2,2,0,"no","yes","yes","no","yes","yes","yes","no",3,3,3,2,3,4,2,"10","11",12 244 | "GP","M",16,"U","LE3","T",4,3,"teacher","other","course","mother",1,1,0,"no","no","no","yes","no","yes","yes","no",5,4,5,1,1,3,0,"6","0",0 245 | "GP","M",16,"U","GT3","T",4,4,"services","services","course","mother",1,1,0,"no","no","no","yes","yes","yes","yes","no",5,3,2,1,2,5,0,"13","12",12 246 | "GP","F",18,"U","GT3","T",2,1,"other","other","course","other",2,3,0,"no","yes","yes","no","no","yes","yes","yes",4,4,4,1,1,3,0,"7","0",0 247 | "GP","M",16,"U","GT3","T",2,1,"other","other","course","mother",3,1,0,"no","no","no","no","yes","yes","yes","no",4,3,3,1,1,4,6,"18","18",18 248 | "GP","M",17,"U","GT3","T",2,3,"other","other","course","father",2,1,0,"no","no","no","no","yes","yes","yes","no",5,2,2,1,1,2,4,"12","12",13 249 | "GP","M",22,"U","GT3","T",3,1,"services","services","other","mother",1,1,3,"no","no","no","no","no","no","yes","yes",5,4,5,5,5,1,16,"6","8",8 250 | "GP","M",18,"R","LE3","T",3,3,"other","services","course","mother",1,2,1,"no","yes","no","no","yes","yes","yes","yes",4,3,3,1,3,5,8,"3","5",5 251 | "GP","M",16,"U","GT3","T",0,2,"other","other","other","mother",1,1,0,"no","no","yes","no","no","yes","yes","no",4,3,2,2,4,5,0,"13","15",15 252 | "GP","M",18,"U","GT3","T",3,2,"services","other","course","mother",2,1,1,"no","no","no","no","yes","no","yes","no",4,4,5,2,4,5,0,"6","8",8 253 | "GP","M",16,"U","GT3","T",3,3,"at_home","other","reputation","other",3,2,0,"yes","yes","no","no","no","yes","yes","no",5,3,3,1,3,2,6,"7","10",10 254 | "GP","M",18,"U","GT3","T",2,1,"services","services","other","mother",1,1,1,"no","no","no","no","no","no","yes","no",3,2,5,2,5,5,4,"6","9",8 255 | "GP","M",16,"R","GT3","T",2,1,"other","other","course","mother",2,1,0,"no","no","no","yes","no","yes","no","no",3,3,2,1,3,3,0,"8","9",8 256 | "GP","M",17,"R","GT3","T",2,1,"other","other","course","mother",1,1,0,"no","no","no","no","no","yes","yes","no",4,4,2,2,4,5,0,"8","12",12 257 | "GP","M",17,"U","LE3","T",1,1,"health","other","course","mother",2,1,1,"no","yes","no","yes","yes","yes","yes","no",4,4,4,1,2,5,2,"7","9",8 258 | "GP","F",17,"U","LE3","T",4,2,"teacher","services","reputation","mother",1,4,0,"no","yes","yes","yes","yes","yes","yes","no",4,2,3,1,1,4,6,"14","12",13 259 | "GP","M",19,"U","LE3","A",4,3,"services","at_home","reputation","mother",1,2,0,"no","yes","no","no","yes","yes","yes","no",4,3,1,1,1,1,12,"11","11",11 260 | "GP","M",18,"U","GT3","T",2,1,"other","other","home","mother",1,2,0,"no","no","no","yes","yes","yes","yes","no",5,2,4,1,2,4,8,"15","14",14 261 | "GP","F",17,"U","LE3","T",2,2,"services","services","course","father",1,4,0,"no","no","yes","yes","yes","yes","yes","yes",3,4,1,1,1,2,0,"10","9",0 262 | "GP","F",18,"U","GT3","T",4,3,"services","other","home","father",1,2,0,"no","yes","yes","no","yes","yes","yes","yes",3,1,2,1,3,2,21,"17","18",18 263 | "GP","M",18,"U","GT3","T",4,3,"teacher","other","course","mother",1,2,0,"no","yes","yes","no","no","yes","yes","no",4,3,2,1,1,3,2,"8","8",8 264 | "GP","M",18,"R","GT3","T",3,2,"other","other","course","mother",1,3,0,"no","no","no","yes","no","yes","no","no",5,3,2,1,1,3,1,"13","12",12 265 | "GP","F",17,"U","GT3","T",3,3,"other","other","home","mother",1,3,0,"no","no","no","yes","no","yes","no","no",3,2,3,1,1,4,4,"10","9",9 266 | "GP","F",18,"U","GT3","T",2,2,"at_home","services","home","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","yes",4,3,3,1,1,3,0,"9","10",0 267 | "GP","M",18,"R","LE3","A",3,4,"other","other","reputation","mother",2,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,2,5,3,4,1,13,"17","17",17 268 | "GP","M",17,"U","GT3","T",3,1,"services","other","other","mother",1,2,0,"no","no","yes","yes","yes","yes","yes","yes",5,4,4,3,4,5,2,"9","9",10 269 | "GP","F",18,"R","GT3","T",4,4,"teacher","other","reputation","mother",2,2,0,"no","no","yes","yes","yes","yes","yes","no",4,3,4,2,2,4,8,"12","10",11 270 | "GP","M",18,"U","GT3","T",4,2,"health","other","reputation","father",1,2,0,"no","yes","yes","yes","yes","yes","yes","yes",5,4,5,1,3,5,10,"10","9",10 271 | "GP","F",18,"R","GT3","T",2,1,"other","other","reputation","mother",2,2,0,"no","yes","no","no","yes","no","yes","yes",4,3,5,1,2,3,0,"6","0",0 272 | "GP","F",19,"U","GT3","T",3,3,"other","services","home","other",1,2,2,"no","yes","yes","yes","yes","yes","yes","no",4,3,5,3,3,5,15,"9","9",9 273 | "GP","F",18,"U","GT3","T",2,3,"other","services","reputation","father",1,4,0,"no","yes","yes","yes","yes","yes","yes","yes",4,5,5,1,3,2,4,"15","14",14 274 | "GP","F",18,"U","LE3","T",1,1,"other","other","home","mother",2,2,0,"no","yes","yes","no","no","yes","no","no",4,4,3,1,1,3,2,"11","11",11 275 | "GP","M",17,"R","GT3","T",1,2,"at_home","at_home","home","mother",1,2,0,"no","yes","yes","yes","no","yes","no","yes",3,5,2,2,2,1,2,"15","14",14 276 | "GP","F",17,"U","GT3","T",2,4,"at_home","health","reputation","mother",2,2,0,"no","yes","yes","no","yes","yes","yes","yes",4,3,3,1,1,1,2,"10","10",10 277 | "GP","F",17,"U","LE3","T",2,2,"services","other","course","mother",2,2,0,"yes","yes","yes","no","yes","yes","yes","yes",4,4,4,2,3,5,6,"12","12",12 278 | "GP","F",18,"R","GT3","A",3,2,"other","services","home","mother",2,2,0,"no","no","no","no","no","no","yes","yes",4,1,1,1,1,5,75,"10","9",9 279 | "GP","M",18,"U","GT3","T",4,4,"teacher","services","home","mother",2,1,0,"no","no","yes","yes","yes","yes","yes","no",3,2,4,1,4,3,22,"9","9",9 280 | "GP","F",18,"U","GT3","T",4,4,"health","health","reputation","father",1,2,1,"yes","yes","no","yes","yes","yes","yes","yes",2,4,4,1,1,4,15,"9","8",8 281 | "GP","M",18,"U","LE3","T",4,3,"teacher","services","course","mother",2,1,0,"no","no","yes","yes","yes","yes","yes","no",4,2,3,1,2,1,8,"10","11",10 282 | "GP","M",17,"U","LE3","A",4,1,"services","other","home","mother",2,1,0,"no","no","yes","yes","yes","yes","yes","yes",4,5,4,2,4,5,30,"8","8",8 283 | "GP","M",17,"U","LE3","A",3,2,"teacher","services","home","mother",1,1,1,"no","no","no","no","yes","yes","yes","no",4,4,4,3,4,3,19,"11","9",10 284 | "GP","F",18,"R","LE3","T",1,1,"at_home","other","reputation","mother",2,4,0,"no","yes","yes","yes","yes","yes","no","no",5,2,2,1,1,3,1,"12","12",12 285 | "GP","F",18,"U","GT3","T",1,1,"other","other","home","mother",2,2,0,"yes","no","no","yes","yes","yes","yes","no",5,4,4,1,1,4,4,"8","9",10 286 | "GP","F",17,"U","GT3","T",2,2,"other","other","course","mother",1,2,0,"no","yes","no","no","no","yes","yes","no",5,4,5,1,2,5,4,"10","9",11 287 | "GP","M",17,"U","GT3","T",1,1,"other","other","reputation","father",1,2,0,"no","no","yes","no","no","yes","yes","no",4,3,3,1,2,4,2,"12","10",11 288 | "GP","F",18,"U","GT3","T",2,2,"at_home","at_home","other","mother",1,3,0,"no","yes","yes","no","yes","yes","yes","no",4,3,3,1,2,2,5,"18","18",19 289 | "GP","F",17,"U","GT3","T",1,1,"services","teacher","reputation","mother",1,3,0,"no","yes","yes","no","yes","yes","yes","no",4,3,3,1,1,3,6,"13","12",12 290 | "GP","M",18,"U","GT3","T",2,1,"services","services","reputation","mother",1,3,0,"no","no","yes","yes","yes","yes","yes","no",4,2,4,1,3,2,6,"15","14",14 291 | "GP","M",18,"U","LE3","A",4,4,"teacher","teacher","reputation","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","no",5,4,3,1,1,2,9,"15","13",15 292 | "GP","M",18,"U","GT3","T",4,2,"teacher","other","home","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","yes",4,3,2,1,4,5,11,"12","11",11 293 | "GP","F",17,"U","GT3","T",4,3,"health","services","reputation","mother",1,3,0,"no","yes","yes","no","yes","yes","yes","no",4,2,2,1,2,3,0,"15","15",15 294 | "GP","F",18,"U","LE3","T",2,1,"services","at_home","reputation","mother",1,2,1,"no","no","no","no","yes","yes","yes","yes",5,4,3,1,1,5,12,"12","12",13 295 | "GP","F",17,"R","LE3","T",3,1,"services","other","reputation","mother",2,4,0,"no","yes","yes","no","yes","yes","no","no",3,1,2,1,1,3,6,"18","18",18 296 | "GP","M",18,"R","LE3","T",3,2,"services","other","reputation","mother",2,3,0,"no","yes","yes","yes","yes","yes","yes","no",5,4,2,1,1,4,8,"14","13",14 297 | "GP","M",17,"U","GT3","T",3,3,"health","other","home","mother",1,1,0,"no","yes","yes","no","yes","yes","yes","no",4,4,3,1,3,5,4,"14","12",11 298 | "GP","F",19,"U","GT3","T",4,4,"health","other","reputation","other",2,2,0,"no","yes","yes","yes","yes","yes","yes","no",2,3,4,2,3,2,0,"10","9",0 299 | "GP","F",18,"U","LE3","T",4,3,"other","other","home","other",2,2,0,"no","yes","yes","no","yes","yes","yes","yes",4,4,5,1,2,2,10,"10","8",8 300 | "GP","F",18,"U","GT3","T",4,3,"other","other","reputation","father",1,4,0,"no","yes","yes","no","yes","yes","yes","no",4,3,3,1,1,3,0,"14","13",14 301 | "GP","M",18,"U","LE3","T",4,4,"teacher","teacher","home","mother",1,1,0,"no","yes","yes","no","yes","yes","yes","yes",1,4,2,2,2,1,5,"16","15",16 302 | "GP","F",18,"U","LE3","A",4,4,"health","other","home","mother",1,2,0,"no","yes","no","no","yes","yes","yes","yes",4,2,4,1,1,4,14,"12","10",11 303 | "GP","M",17,"U","LE3","T",4,4,"other","teacher","home","father",2,1,0,"no","no","yes","no","yes","yes","yes","no",4,1,1,2,2,5,0,"11","11",10 304 | "GP","F",17,"U","GT3","T",4,2,"other","other","reputation","mother",2,3,0,"no","yes","yes","no","yes","yes","yes","no",4,3,3,1,1,3,0,"15","12",14 305 | "GP","F",17,"U","GT3","T",3,2,"health","health","reputation","father",1,4,0,"no","yes","yes","yes","no","yes","yes","no",5,2,2,1,2,5,0,"17","17",18 306 | "GP","M",19,"U","GT3","T",3,3,"other","other","home","other",1,2,1,"no","yes","no","yes","yes","yes","yes","yes",4,4,4,1,1,3,20,"15","14",13 307 | "GP","F",18,"U","GT3","T",2,4,"services","at_home","reputation","other",1,2,1,"no","yes","yes","yes","yes","yes","yes","no",4,4,3,1,1,3,8,"14","12",12 308 | "GP","M",20,"U","GT3","A",3,2,"services","other","course","other",1,1,0,"no","no","no","yes","yes","yes","no","no",5,5,3,1,1,5,0,"17","18",18 309 | "GP","M",19,"U","GT3","T",4,4,"teacher","services","reputation","other",2,1,1,"no","yes","yes","no","yes","yes","yes","yes",4,3,4,1,1,4,38,"8","9",8 310 | "GP","M",19,"R","GT3","T",3,3,"other","services","reputation","father",1,2,1,"no","no","no","yes","yes","yes","no","yes",4,5,3,1,2,5,0,"15","12",12 311 | "GP","F",19,"U","LE3","T",1,1,"at_home","other","reputation","other",1,2,1,"yes","yes","no","yes","no","yes","yes","no",4,4,3,1,3,3,18,"12","10",10 312 | "GP","F",19,"U","LE3","T",1,2,"services","services","home","other",1,2,1,"no","no","no","yes","no","yes","no","yes",4,2,4,2,2,3,0,"9","9",0 313 | "GP","F",19,"U","GT3","T",2,1,"at_home","other","other","other",3,2,0,"no","yes","no","no","yes","no","yes","yes",3,4,1,1,1,2,20,"14","12",13 314 | "GP","M",19,"U","GT3","T",1,2,"other","services","course","other",1,2,1,"no","no","no","no","no","yes","yes","no",4,5,2,2,2,4,3,"13","11",11 315 | "GP","F",19,"U","LE3","T",3,2,"services","other","reputation","other",2,2,1,"no","yes","yes","no","no","yes","yes","yes",4,2,2,1,2,1,22,"13","10",11 316 | "GP","F",19,"U","GT3","T",1,1,"at_home","health","home","other",1,3,2,"no","no","no","no","no","yes","yes","yes",4,1,2,1,1,3,14,"15","13",13 317 | "GP","F",19,"R","GT3","T",2,3,"other","other","reputation","other",1,3,1,"no","no","no","no","yes","yes","yes","yes",4,1,2,1,1,3,40,"13","11",11 318 | "GP","F",18,"U","GT3","T",2,1,"services","other","course","mother",2,2,0,"no","yes","yes","yes","yes","yes","yes","no",5,3,3,1,2,1,0,"8","8",0 319 | "GP","F",18,"U","GT3","T",4,3,"other","other","course","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","yes",4,3,4,1,1,5,9,"9","10",9 320 | "GP","F",17,"R","GT3","T",3,4,"at_home","services","course","father",1,3,0,"no","yes","yes","yes","no","yes","yes","no",4,3,4,2,5,5,0,"11","11",10 321 | "GP","F",18,"U","GT3","T",4,4,"teacher","other","course","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,4,4,3,3,5,2,"11","11",11 322 | "GP","F",17,"U","GT3","A",4,3,"services","services","course","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","yes",5,2,2,1,2,5,23,"13","13",13 323 | "GP","F",17,"U","GT3","T",2,2,"other","other","course","mother",1,2,0,"no","yes","no","no","yes","yes","no","yes",4,2,2,1,1,3,12,"11","9",9 324 | "GP","F",17,"R","LE3","T",2,2,"services","services","course","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","no",3,3,2,2,2,3,3,"11","11",11 325 | "GP","F",17,"U","GT3","T",3,1,"services","services","course","father",1,3,0,"no","yes","no","no","no","yes","yes","no",3,4,3,2,3,5,1,"12","14",15 326 | "GP","F",17,"U","LE3","T",0,2,"at_home","at_home","home","father",2,3,0,"no","no","no","no","yes","yes","yes","no",3,3,3,2,3,2,0,"16","15",15 327 | "GP","M",18,"U","GT3","T",4,4,"other","other","course","mother",1,3,0,"no","no","no","yes","yes","yes","yes","no",4,3,3,2,2,3,3,"9","12",11 328 | "GP","M",17,"U","GT3","T",3,3,"other","services","reputation","mother",1,1,0,"no","no","no","yes","no","yes","yes","no",4,3,5,3,5,5,3,"14","15",16 329 | "GP","M",17,"R","GT3","T",2,2,"services","other","course","mother",4,1,0,"no","yes","no","no","yes","yes","yes","no",4,4,5,5,5,4,8,"11","10",10 330 | "GP","F",17,"U","GT3","T",4,4,"teacher","services","course","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","no",5,4,4,1,3,4,7,"10","9",9 331 | "GP","F",17,"U","GT3","T",4,4,"teacher","teacher","course","mother",2,3,0,"no","yes","yes","no","no","yes","yes","yes",4,3,3,1,2,4,4,"14","14",14 332 | "GP","M",18,"U","LE3","T",2,2,"other","other","course","mother",1,4,0,"no","yes","no","yes","yes","yes","yes","no",4,5,5,2,4,5,2,"9","8",8 333 | "GP","F",17,"R","GT3","T",2,4,"at_home","other","course","father",1,3,0,"no","yes","no","no","yes","yes","yes","yes",4,4,3,1,1,5,7,"12","14",14 334 | "GP","F",18,"U","GT3","T",3,3,"services","services","home","mother",1,2,0,"no","no","no","yes","yes","yes","yes","no",5,3,4,1,1,4,0,"7","0",0 335 | "GP","F",18,"U","LE3","T",2,2,"other","other","home","other",1,2,0,"no","no","no","yes","no","yes","yes","yes",4,3,3,1,1,2,0,"8","8",0 336 | "GP","F",18,"R","GT3","T",2,2,"at_home","other","course","mother",2,4,0,"no","no","no","yes","yes","yes","no","no",4,4,4,1,1,4,0,"10","9",0 337 | "GP","F",17,"U","GT3","T",3,4,"services","other","course","mother",1,3,0,"no","no","no","no","yes","yes","yes","no",4,4,5,1,3,5,16,"16","15",15 338 | "GP","F",19,"R","GT3","A",3,1,"services","at_home","home","other",1,3,1,"no","no","yes","no","yes","yes","no","no",5,4,3,1,2,5,12,"14","13",13 339 | "GP","F",17,"U","GT3","T",3,2,"other","other","home","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","yes",4,3,2,2,3,2,0,"7","8",0 340 | "GP","F",18,"U","LE3","T",3,3,"services","services","home","mother",1,4,0,"no","yes","no","no","yes","yes","yes","no",5,3,3,1,1,1,7,"16","15",17 341 | "GP","F",17,"R","GT3","A",3,2,"other","other","home","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,3,3,2,3,2,4,"9","10",10 342 | "GP","F",19,"U","GT3","T",2,1,"services","services","home","other",1,3,1,"no","no","yes","yes","yes","yes","yes","yes",4,3,4,1,3,3,4,"11","12",11 343 | "GP","M",18,"U","GT3","T",4,4,"teacher","services","home","father",1,2,1,"no","yes","no","yes","yes","yes","yes","no",4,3,3,2,2,2,0,"10","10",0 344 | "GP","M",18,"U","LE3","T",3,4,"services","other","home","mother",1,2,0,"no","no","no","yes","yes","yes","yes","yes",4,3,3,1,3,5,11,"16","15",15 345 | "GP","F",17,"U","GT3","A",2,2,"at_home","at_home","home","father",1,2,1,"no","yes","no","no","yes","yes","yes","yes",3,3,1,1,2,4,0,"9","8",0 346 | "GP","F",18,"U","GT3","T",2,3,"at_home","other","course","mother",1,3,0,"no","yes","no","no","yes","yes","yes","no",4,3,3,1,2,3,4,"11","10",10 347 | "GP","F",18,"U","GT3","T",3,2,"other","services","other","mother",1,3,0,"no","no","no","no","yes","yes","yes","yes",5,4,3,2,3,1,7,"13","13",14 348 | "GP","M",18,"R","GT3","T",4,3,"teacher","services","course","mother",1,3,0,"no","no","no","no","yes","yes","yes","yes",5,3,2,1,2,4,9,"16","15",16 349 | "GP","M",18,"U","GT3","T",4,3,"teacher","other","course","mother",1,3,0,"no","yes","yes","no","yes","yes","yes","yes",5,4,5,2,3,5,0,"10","10",9 350 | "GP","F",17,"U","GT3","T",4,3,"health","other","reputation","mother",1,3,0,"no","yes","yes","yes","yes","yes","yes","yes",4,4,3,1,3,4,0,"13","15",15 351 | "MS","M",18,"R","GT3","T",3,2,"other","other","course","mother",2,1,1,"no","yes","no","no","no","yes","yes","no",2,5,5,5,5,5,10,"11","13",13 352 | "MS","M",19,"R","GT3","T",1,1,"other","services","home","other",3,2,3,"no","no","no","no","yes","yes","yes","no",5,4,4,3,3,2,8,"8","7",8 353 | "MS","M",17,"U","GT3","T",3,3,"health","other","course","mother",2,2,0,"no","yes","yes","no","yes","yes","yes","no",4,5,4,2,3,3,2,"13","13",13 354 | "MS","M",18,"U","LE3","T",1,3,"at_home","services","course","mother",1,1,1,"no","no","no","no","yes","no","yes","yes",4,3,3,2,3,3,7,"8","7",8 355 | "MS","M",19,"R","GT3","T",1,1,"other","other","home","other",3,1,1,"no","yes","no","no","yes","yes","yes","no",4,4,4,3,3,5,4,"8","8",8 356 | "MS","M",17,"R","GT3","T",4,3,"services","other","home","mother",2,2,0,"no","yes","yes","yes","no","yes","yes","yes",4,5,5,1,3,2,4,"13","11",11 357 | "MS","F",18,"U","GT3","T",3,3,"services","services","course","father",1,2,0,"no","yes","no","no","yes","yes","no","yes",5,3,4,1,1,5,0,"10","9",9 358 | "MS","F",17,"R","GT3","T",4,4,"teacher","services","other","father",2,2,0,"no","yes","yes","yes","yes","yes","yes","no",4,3,3,1,2,5,4,"12","13",13 359 | "MS","F",17,"U","LE3","A",3,2,"services","other","reputation","mother",2,2,0,"no","no","no","no","yes","yes","no","yes",1,2,3,1,2,5,2,"12","12",11 360 | "MS","M",18,"U","LE3","T",1,1,"other","services","home","father",2,1,0,"no","no","no","no","no","yes","yes","yes",3,3,2,1,2,3,4,"10","10",10 361 | "MS","F",18,"U","LE3","T",1,1,"at_home","services","course","father",2,3,0,"no","no","no","no","yes","yes","yes","no",5,3,2,1,1,4,0,"18","16",16 362 | "MS","F",18,"R","LE3","A",1,4,"at_home","other","course","mother",3,2,0,"no","no","no","no","yes","yes","no","yes",4,3,4,1,4,5,0,"13","13",13 363 | "MS","M",18,"R","LE3","T",1,1,"at_home","other","other","mother",2,2,1,"no","no","no","yes","no","no","no","no",4,4,3,2,3,5,2,"13","12",12 364 | "MS","F",18,"U","GT3","T",3,3,"services","services","other","mother",2,2,0,"no","yes","no","no","yes","yes","yes","yes",4,3,2,1,3,3,0,"11","11",10 365 | "MS","F",17,"U","LE3","T",4,4,"at_home","at_home","course","mother",1,2,0,"no","yes","yes","yes","yes","yes","yes","yes",2,3,4,1,1,1,0,"16","15",15 366 | "MS","F",17,"R","GT3","T",1,2,"other","services","course","father",2,2,0,"no","no","no","no","no","yes","no","no",3,2,2,1,2,3,0,"12","11",12 367 | "MS","M",18,"R","GT3","T",1,3,"at_home","other","course","mother",2,2,0,"no","yes","yes","no","yes","yes","no","no",3,3,4,2,4,3,4,"10","10",10 368 | "MS","M",18,"U","LE3","T",4,4,"teacher","services","other","mother",2,3,0,"no","no","yes","no","yes","yes","yes","yes",4,2,2,2,2,5,0,"13","13",13 369 | "MS","F",17,"R","GT3","T",1,1,"other","services","reputation","mother",3,1,1,"no","yes","yes","no","yes","yes","yes","yes",5,2,1,1,2,1,0,"7","6",0 370 | "MS","F",18,"U","GT3","T",2,3,"at_home","services","course","father",2,1,0,"no","yes","yes","no","yes","yes","yes","yes",5,2,3,1,2,4,0,"11","10",10 371 | "MS","F",18,"R","GT3","T",4,4,"other","teacher","other","father",3,2,0,"no","yes","yes","no","no","yes","yes","yes",3,2,2,4,2,5,10,"14","12",11 372 | "MS","F",19,"U","LE3","T",3,2,"services","services","home","other",2,2,2,"no","no","no","yes","yes","yes","no","yes",3,2,2,1,1,3,4,"7","7",9 373 | "MS","M",18,"R","LE3","T",1,2,"at_home","services","other","father",3,1,0,"no","yes","yes","yes","yes","no","yes","yes",4,3,3,2,3,3,3,"14","12",12 374 | "MS","F",17,"U","GT3","T",2,2,"other","at_home","home","mother",1,3,0,"no","no","no","yes","yes","yes","no","yes",3,4,3,1,1,3,8,"13","11",11 375 | "MS","F",17,"R","GT3","T",1,2,"other","other","course","mother",1,1,0,"no","no","no","yes","yes","yes","yes","no",3,5,5,1,3,1,14,"6","5",5 376 | "MS","F",18,"R","LE3","T",4,4,"other","other","reputation","mother",2,3,0,"no","no","no","no","yes","yes","yes","no",5,4,4,1,1,1,0,"19","18",19 377 | "MS","F",18,"R","GT3","T",1,1,"other","other","home","mother",4,3,0,"no","no","no","no","yes","yes","yes","no",4,3,2,1,2,4,2,"8","8",10 378 | "MS","F",20,"U","GT3","T",4,2,"health","other","course","other",2,3,2,"no","yes","yes","no","no","yes","yes","yes",5,4,3,1,1,3,4,"15","14",15 379 | "MS","F",18,"R","LE3","T",4,4,"teacher","services","course","mother",1,2,0,"no","no","yes","yes","yes","yes","yes","no",5,4,3,3,4,2,4,"8","9",10 380 | "MS","F",18,"U","GT3","T",3,3,"other","other","home","mother",1,2,0,"no","no","yes","no","yes","yes","yes","yes",4,1,3,1,2,1,0,"15","15",15 381 | "MS","F",17,"R","GT3","T",3,1,"at_home","other","reputation","mother",1,2,0,"no","yes","yes","yes","no","yes","yes","no",4,5,4,2,3,1,17,"10","10",10 382 | "MS","M",18,"U","GT3","T",4,4,"teacher","teacher","home","father",1,2,0,"no","no","yes","yes","no","yes","yes","no",3,2,4,1,4,2,4,"15","14",14 383 | "MS","M",18,"R","GT3","T",2,1,"other","other","other","mother",2,1,0,"no","no","no","yes","no","yes","yes","yes",4,4,3,1,3,5,5,"7","6",7 384 | "MS","M",17,"U","GT3","T",2,3,"other","services","home","father",2,2,0,"no","no","no","yes","yes","yes","yes","no",4,4,3,1,1,3,2,"11","11",10 385 | "MS","M",19,"R","GT3","T",1,1,"other","services","other","mother",2,1,1,"no","no","no","no","yes","yes","no","no",4,3,2,1,3,5,0,"6","5",0 386 | "MS","M",18,"R","GT3","T",4,2,"other","other","home","father",2,1,1,"no","no","yes","no","yes","yes","no","no",5,4,3,4,3,3,14,"6","5",5 387 | "MS","F",18,"R","GT3","T",2,2,"at_home","other","other","mother",2,3,0,"no","no","yes","no","yes","yes","no","no",5,3,3,1,3,4,2,"10","9",10 388 | "MS","F",18,"R","GT3","T",4,4,"teacher","at_home","reputation","mother",3,1,0,"no","yes","yes","yes","yes","yes","yes","yes",4,4,3,2,2,5,7,"6","5",6 389 | "MS","F",19,"R","GT3","T",2,3,"services","other","course","mother",1,3,1,"no","no","no","yes","no","yes","yes","no",5,4,2,1,2,5,0,"7","5",0 390 | "MS","F",18,"U","LE3","T",3,1,"teacher","services","course","mother",1,2,0,"no","yes","yes","no","yes","yes","yes","no",4,3,4,1,1,1,0,"7","9",8 391 | "MS","F",18,"U","GT3","T",1,1,"other","other","course","mother",2,2,1,"no","no","no","yes","yes","yes","no","no",1,1,1,1,1,5,0,"6","5",0 392 | "MS","M",20,"U","LE3","A",2,2,"services","services","course","other",1,2,2,"no","yes","yes","no","yes","yes","no","no",5,5,4,4,5,4,11,"9","9",9 393 | "MS","M",17,"U","LE3","T",3,1,"services","services","course","mother",2,1,0,"no","no","no","no","no","yes","yes","no",2,4,5,3,4,2,3,"14","16",16 394 | "MS","M",21,"R","GT3","T",1,1,"other","other","course","other",1,1,3,"no","no","no","no","no","yes","no","no",5,5,3,3,3,3,3,"10","8",7 395 | "MS","M",18,"R","LE3","T",3,2,"services","other","course","mother",3,1,0,"no","no","no","no","no","yes","yes","no",4,4,1,3,4,5,0,"11","12",10 396 | "MS","M",19,"U","LE3","T",1,1,"other","at_home","course","father",1,1,0,"no","no","no","no","yes","yes","yes","no",3,2,3,3,3,5,5,"8","9",9 397 | -------------------------------------------------------------------------------- /travel_time_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohithYogi/Student-Performance-Prediction/7ab64a53718481cdcbd2b917d646cea25b833082/travel_time_plot.png --------------------------------------------------------------------------------