Question
1) Build a Naive Gaussian model to predict GRADUATED based on available data. 2) Evaluate the accuracy of your model. Function call 1: predict_graduation(df_train, df_test)
1) Build a Naive Gaussian model to predict GRADUATED based on available data.
2) Evaluate the accuracy of your model.
Function call 1:
predict_graduation(df_train, df_test)
# optional: process data to attempt to increase accuracy
return predicted outcomes for df_test
Input:
df_train = a data frame like the assignment3 ones...
df_test = a data frame of unknown size but otherwise identical to DATA_ASSIGNMENT_3_n.csv except it does not have the GRADUATED
column.
Output:
predicted outcomes is a sequence of values (in this case predictions for GRADUATED)
Function call 2:
evaluate_model(predicted, observed)
#
#determine True Positive (predicted_values = observed = True)
#determine True Negative (predicted_values = observed = False)
#determine False Positive (predicted_values = True, observed = False)
#determine False Negative (predicted_values = False, observed = True)
#determine specificity (True Negative / (True Negative + False Positive))
#determine sensitivity (True Positive / (True Positive + False Negative))
return TP, TN, FP, FN, specificity, sensitivity
input: predicted = sequence and observed = sequence
dataset:
SMARTS,MOTIVATION,HOME_LIFE,GRADUATED
2,2,2,True
2,3,2,True
2,2,2,True
3,1,2,True
2,2,2,True
2,2,2,True
2,3,3,False
2,2,2,True
2,2,2,False
2,2,2,True
2,2,2,True
2,2,2,True
1,3,1,True
2,2,2,True
2,2,2,True
2,2,2,True
1,2,2,False
2,2,1,False
2,3,2,True
2,2,2,False
3,2,2,True
2,1,3,True
2,2,3,True
2,2,1,False
2,2,2,False
3,2,3,True
3,2,2,True
2,2,2,True
2,2,3,False
2,2,2,True
3,2,2,True
2,3,2,True
2,3,2,True
2,2,3,False
2,1,2,True
3,2,2,True
2,3,2,False
2,2,2,False
3,2,2,True
3,2,2,True
2,2,2,True
2,2,2,True
3,1,2,True
2,2,1,True
3,2,3,True
2,1,2,False
2,2,2,True
2,2,2,False
2,2,2,False
2,2,2,True
2,2,1,False
2,2,2,True
3,2,2,False
2,2,2,True
2,2,1,True
2,1,2,False
2,3,1,True
2,2,2,True
2,3,2,True
2,2,2,True
1,2,2,False
2,2,2,False
2,3,3,True
2,2,2,False
2,2,2,False
2,2,3,True
2,3,2,True
1,1,3,False
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started