Icon

20_​ROC_​Curve - Solution

20_ROC_Curve - Solution
Exercise ROC Curve1) Read data predicted_gender.csvThe "sex" column contains people’s actual gender: Female or Male. The “Prediction (sex) ...” columns contain their gender valuespredicted by two different classification models - a decision tree (DT) and logistic regression model (LR). The “P(sex=Female)...”columns contain the predicted probabilities of being female produced by the two models.2) Evaluate the performance of the decision tree model using the ROC curve node- Set the Class column, Positive class value, and Columns containing the positive class probabilities in the configuration dialog- Execute the node and open the interactive view- What is the area under the curve for the decision tree model?3) Compare the performance of the decision tree and logistic regression models by plotting their ROC curves in the same graph- Open the configuration dialog of the ROC Curve node- Add the relevant columns to the Columns containing the positive class probabilities- Which of the models perform better?- What is the area under the curve for the logistic regression model?4) OPTIONAL: open the interactive view again and change the title of the view to “Performance of Decision Tree and LogisticRegression Models in Predicting Gender”. Area under the curveDecision tree model: 0.849Logistic regression model: 0.931Best performanceLogistic Regression Read datapredicted_gender.csvEvaluatemodel performances File Reader ROC Curve Exercise ROC Curve1) Read data predicted_gender.csvThe "sex" column contains people’s actual gender: Female or Male. The “Prediction (sex) ...” columns contain their gender valuespredicted by two different classification models - a decision tree (DT) and logistic regression model (LR). The “P(sex=Female)...”columns contain the predicted probabilities of being female produced by the two models.2) Evaluate the performance of the decision tree model using the ROC curve node- Set the Class column, Positive class value, and Columns containing the positive class probabilities in the configuration dialog- Execute the node and open the interactive view- What is the area under the curve for the decision tree model?3) Compare the performance of the decision tree and logistic regression models by plotting their ROC curves in the same graph- Open the configuration dialog of the ROC Curve node- Add the relevant columns to the Columns containing the positive class probabilities- Which of the models perform better?- What is the area under the curve for the logistic regression model?4) OPTIONAL: open the interactive view again and change the title of the view to “Performance of Decision Tree and LogisticRegression Models in Predicting Gender”. Area under the curveDecision tree model: 0.849Logistic regression model: 0.931Best performanceLogistic Regression Read datapredicted_gender.csvEvaluatemodel performances File Reader ROC Curve

Nodes

Extensions

Links