Scikit-learn
Compute Metric
Compute metrics for predictions. This recipe supports following metrics: Accuracy, ROC AUC, Precision, Recall, LogLoss, MCC, MSE, RMSE, MAE, R2. Please use advanced settings to provide sample weights for metric function.
metricaccuracy
Required packages
You need below packages to use the code generated by recipe. All packages are automatically installed in MLJAR Studio.
scikit-learn>=1.5.0
Interactive recipe
You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.
In the below recipe, we assume that you have following variables available in your notebook:
- y (type Series)
- predicted (type DataFrame)
- predicted_binary (type DataFrame)
- predicted_multi (type DataFrame)
Python code
# Python code will be here
Code explanation
- Compute metric to assess performance between true and predicted values.
- Print computed score.
Example Python notebooks
Please find inspiration in example notebooks
Scikit-learn cookbook
Code recipes from Scikit-learn cookbook.
- « Previous
- Feature Importance
- Next »
- Confusion Matrix