# Custom metrics for model selection
URL: https://docs.datarobot.com/en/docs/api/dev-learning/accelerators/model-eval-metrics/ai-custom-metrics.html

> This AI Accelerator demonstrates how one can leverage DataRobot's Python client to extract predictions, compute custom metrics, and sort their DataRobot models accordingly.

# Custom metrics for model selection

[Access this AI accelerator on GitHub](https://github.com/datarobot-community/ai-accelerators/blob/main/advanced_ml_and_api_approaches/custom_leaderboard_metrics/custom_metrics.ipynb)

When it comes to evaluating model performance, DataRobot provides many of the standard metrics [out-of-the box](https://docs.datarobot.com/en/docs/reference/pred-ai-ref/opt-metric.html), either on the [Leaderboard](https://docs.datarobot.com/en/docs/reference/pred-ai-ref/leaderboard-ref.html) or as part of a [model insight](https://docs.datarobot.com/en/docs/classic-ui/modeling/analyze-models/index.html).

However, depending on the industry, you may need to sort your DataRobot leaderboard by a specific metric not natively supported by DataRobot. This AI Accelerator demonstrates how one can leverage DataRobot's Python client to extract predictions, compute custom metrics, and sort their DataRobot models accordingly. The topics covered are as follows:

- Setup: import libraries and connect to DataRobot
- Build models with Autopilot
- Retrieve predictions and actuals
- Sort models by Brier Skill Score (BSS)
- Sort models by Rate@Top1%
- Sort models by return-on-investment (ROI)

In addition, although sometimes difficult, assigning the ROI of utilizing machine learning can be vital for use case adoption and model implementation. Creating a payoff matrix uses a compted dollar figure rather than a machine learning metric.

---
