Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

r confusion matrix

# Get the actual responses from the dataset
actual_response <- churn$has_churned

# Get the "most likely" responses from the model
predicted_response <- round(fitted(mdl_churn_vs_relationship))

# Create a table of counts
outcomes <- table(predicted_response, actual_response)

# See the result
outcomes
Source by campus.datacamp.com #
 
PREVIOUS NEXT
Tagged: #confusion #matrix
ADD COMMENT
Topic
Name
7+2 =