> For the complete documentation index, see [llms.txt](https://docs.nannyml.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nannyml.com/cloud/v0.23.0/model-monitoring/custom-metrics/creating-custom-metrics.md).

# Creating Custom Metrics

Let's see how we can create a custom metric for each machine learning problem type. To make things more structured, we have created a separate page for each problem type. The key to creating a custom metric is to write the code for its required functions.

## [Creating a Binary Classification Custom Metric](/cloud/v0.23.0/model-monitoring/custom-metrics/creating-custom-metrics/writing-functions-for-binary-classification.md) <a href="#add-binary-classification-custom-metric" id="add-binary-classification-custom-metric"></a>

## [Creating a Multiclass Classification Custom Metric](/cloud/v0.23.0/model-monitoring/custom-metrics/creating-custom-metrics/writing-functions-for-multiclass-classification.md)

## [Creating a Regression Custom Metric](/cloud/v0.23.0/model-monitoring/custom-metrics/creating-custom-metrics/writing-functions-for-regression.md)

We also discuss more advanced topics such as [handling missing values](/cloud/v0.23.0/model-monitoring/custom-metrics/creating-custom-metrics/handling-missing-values.md) and [creating a custom MTBF metric](/cloud/v0.23.0/model-monitoring/custom-metrics/creating-custom-metrics/advanced-tutorial-creating-a-mtbf-custom-metric.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nannyml.com/cloud/v0.23.0/model-monitoring/custom-metrics/creating-custom-metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
