Question: I need help fixing this code, please see attachedIn [ 3 3 ] : default _ model _ data - data [ c ( '
I need help fixing this code, please see attachedIn : defaultmodeldatadatacage 'talach', cp 'trestbps'
pred predictmode newdatadefaultmodeldata, type'response'
# If the predicted probability of default is then predict target default default otherwise predict no target
# default default
depvarpred asfactorifelsepred
# This creates the confusion matrix
conf.matrix tabledata$heartdata, depvarpredc
rownamesconfmatrix pasteActual rownamesconfmatrix sep : default
colnamesconfmatrix pastePrediction colnamesconfmatrix sep : default
# Print nicely formatted confusion matrix
print Confusion Matrix"
format confmatrix, justify"centre", digit
Error in datacage "talach", cp "trestbps": object of type 'closure' is not subsettable
Traceback:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
