Question: Need help with 8&9 Coding in R. # CG Q7 # Use the following code to create a confusion matrix and calculate the PPV. rule
Need help with 8&9 Coding in R.
# CG Q7 # Use the following code to create a confusion matrix and calculate the PPV. rule <- 1/5 # classification rule yhat <- as.numeric(fit$fitted>rule) # classify subscription status based on your rule table(yhat, actualSubscriptionStatus=tlmrk$subscribe) # confusion matrix # Now, use the confusion matrix to calculate the sensitivity (recall).
# CG Q8 # Now, for a classification rule of 1/12, find the PPV (precision). ######### You should submit 4 separate lines of code.
# CG Q9 # Calculate the specificity for a rule of 1/3 using 4 lines of code again. ######### Name the rule object rule3 and your predicted subscription status yhat3.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
