> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# False positive rate

> Learn how to use the false positive rate test

## Definition

The false positive rate test measures the ratio of false positives to the total number of actual negatives, calculated as FP / (FP + TN). This metric indicates how often the model incorrectly predicts the positive class when the true class is negative.

## Taxonomy

* **Task types**: Tabular classification, text classification.
* **Availability**: development (Continuously evaluate your models and datasets as you iterate on their versions.)
  and monitoring (Monitor a model in production, measure its health, check for drifts and set up alerts.).

> [!NOTE]
>
> The false positive rate is only available for **binary classification** tasks.

## Why it matters

* False positive rate is crucial for understanding the model's tendency to make incorrect positive predictions.
* It's particularly important in applications where false positives are costly, such as medical diagnosis, fraud detection, or spam filtering.
* Lower false positive rates indicate better model performance, with 0 representing no false positives.
* This metric complements precision and recall by focusing specifically on the negative class performance.

## Required columns

To compute this metric, your dataset must contain the following columns:

* **Predictions**: The predicted class labels from your binary classification model
* **Ground truths**: The actual/true class labels

## Test configuration examples

If you are writing a `tests.json`, here are a few valid configurations for the false positive rate test:

```json Development theme={null}
[
  {
    "name": "False positive rate below 0.05",
    "description": "Ensure that the false positive rate is below 0.05",
    "type": "performance",
    "subtype": "metricThreshold",
    "thresholds": [
      {
        "insightName": "metrics",
        "measurement": "falsePositiveRate",
        "operator": "<",
        "value": 0.05
      }
    ],
    "subpopulationFilters": null,
    "mode": "development",
    "usesValidationDataset": true,
    "usesTrainingDataset": false,
    "usesMlModel": true,
    "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
  }
]
```

```json Monitoring theme={null}
[
  {
    "name": "False positive rate below 0.05",
    "description": "Ensure that the false positive rate is below 0.05",
    "type": "performance",
    "subtype": "metricThreshold",
    "thresholds": [
      {
        "insightName": "metrics",
        "measurement": "falsePositiveRate",
        "operator": "<",
        "value": 0.05
      }
    ],
    "subpopulationFilters": null,
    "mode": "monitoring",
    "usesProductionData": true,
    "evaluationWindow": 3600,
    "delayWindow": 0,
    "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
  }
]
```

## Related

* [Precision test](https://docs.openlayer.com/tests/catalog/precision.md) - Measure positive prediction accuracy.
* [Recall test](https://docs.openlayer.com/tests/catalog/recall.md) - Measure ability to find all positive instances.
* [ROC AUC test](https://docs.openlayer.com/tests/catalog/roc-auc.md) - Area under the receiver operating characteristic curve.
* [Accuracy test](https://docs.openlayer.com/tests/catalog/accuracy.md) - Overall classification correctness.
* [Aggregate metrics](https://docs.openlayer.com/tests/performance/aggregate-metrics) - Overview of all available metrics.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.