All metrics
List of all the metrics and metric presets available in Evidently.
We are doing our best to maintain this page up to date. In case of discrepancies, consult the API reference or the current version of the "All metrics" example notebook in the Examples section. If you notice an error, please send us a pull request to update the documentation!
Metric Presets
Defaults: each Metric in a Preset uses the default parameters for this Metric. You can see them in the tables below.
Preset name and Description | Parameters |
---|---|
| Optional:
|
| Optional:
How to set data drift parameters, embeddings drift parameters. |
If regression:
| Optional:
|
| Optional:
|
If probabilistic classification, also:
| Optional:
|
If reference data is provided, also:
| Required:
|
| Required:
|
Data Integrity
Defaults for Missing Values. The metrics that calculate the number or share of missing values detect four types of the values by default: Pandas nulls (None, NAN, etc.), "" (empty string), Numpy "-inf" value, Numpy "inf" value. You can also pass a custom missing values as a parameter and specify if you want to replace the default list. Example:
Metric name | Description | Parameters |
---|---|---|
DatasetSummaryMetric() | Dataset-level. Calculates various descriptive statistics for the dataset, incl. the number of columns, rows, cat/num features, missing values, empty values, and duplicate values. | Required: n/a Optional:
|
DatasetMissingValuesMetric() | Dataset-level. Calculates the number and share of missing values in the dataset. Displays the number of missing values per column. | Required: n/a Optional:
|
ColumnSummaryMetric(column_name="age") | Column-level. Calculates various descriptive statistics for the column, incl. the number of missing, empty, duplicate values, etc. The stats depend on the column type: numerical, categorical, text or DateTime. | Required:
|
ColumnMissingValuesMetric(column_name="education") | Column-level. Calculates the number and share of missing values in the column. | Required: n/a Optional:
|
ColumnRegExpMetric(column_name="relationship", reg_exp=r".child.") | Column-level. Calculates the number and share of the values that do not match a defined regular expression. | Required:
Optional:
|
Data Quality
Metric name | Description | Parameters |
---|---|---|
ConflictPredictionMetric() | Dataset-level. Calculates the number of instances where the model returns a different output for an identical input. Can be a signal of low-quality model or data errors. | Required: n/a Optional: n/a |
ConflictTargetMetric() | Dataset-level. Calculates the number of instances where there is a different target value or label for an identical input. Can be a signal of a labeling or data error. | Required: n/a Optional: n/a |
DatasetCorrelationsMetric() | Dataset-level. Calculates the correlations between the columns in the dataset. Visualizes the heatmap. | Required: n/a Optional: n/a |
ColumnDistributionMetric(column_name="education") | Column-level. Plots the distribution histogram and returns bin positions and values for the given column. | Required:
|
ColumnValuePlot(column_name="education") | Column-level. Plots the values in time. | Required:
|
ColumnQuantileMetric(column_name="education-num", quantile=0.75) | Column-level. Calculates the defined quantile value and plots the distribution for the given column. | Required:
Optional: n/a |
ColumnCorrelationsMetric(column_name="education") | Column-level. Calculates the correlations between the defined column and all the other columns in the dataset. | Required:
|
ColumnValueListMetric(column_name="relationship", values=["Husband", "Unmarried"]) | Column-level. Calculates the number of values in the list / out of the list / not found in a given column. The value list should be specified. | Required:
Optional: n/a |
ColumnValueRangeMetric(column_name="age", left=10, right=20) | Column-level. Calculates the number and share of values in the specified range / out of range in a given column. Plots the distributions. | Required:
|
TextDescriptorsDistribution(column_name=”text”) | Column-level. Calculates and visualizes distributions for auto-generated text descriptors (text length, the share of out-of-vocabulary words, etc.) | Required:
|
TextDescriptorsCorrelationMetric(column_name=”text”) | Column-level. Calculates and visualizes correlations between auto-generated text descriptors and other columns in the dataset. | Required:
|
Data Drift
Defaults for Data Drift. By default, all data drift tests use the Evidently drift detection logic that selects a different statistical test or metric based on feature type and volume. You always need a reference dataset.
To modify the logic or select a different test, you should set data drift parameters or embeddings drift parameters.
Metric name | Description | Parameters |
---|---|---|
DatasetDriftMetric() | Dataset-level. Calculates the number and share of drifted features. Returns true/false for the dataset drift at a given threshold (defined by the share of drifting features). Each feature is tested for drift individually using the default algorithm, unless a custom approach is specified. | Required: n/a Optional:
|
DataDriftTable() | Dataset-level. Calculates data drift for all columns in the dataset, or for a defined list of columns. Returns drift detection results for each column and visualizes distributions in a table. Uses the default drift algorithm of test selection, unless a custom approach is specified. | Required: n/a Optional:
How to set data drift parameters, embeddings drift parameters. |
ColumnDriftMetric('age') | Column-level. Calculates data drift for a defined column (tabular or text). Visualizes distributions. Uses the default-selected test unless a custom is specified. | |
TextDescriptorsDriftMetric(column_name=”text”) | Column-level. Calculates data drift for auto-generated text descriptors and visualizes the distributions of text characteristics. | Required:
Optional:
|
EmbeddingsDriftMetric('small_subset') | Column-level. Calculates data drift for embeddings. |
Classification
The metrics work both for probabilistic and non-probabilistic classification. All metrics are dataset-level.
Metric name | Description | Parameters |
---|---|---|
ClassificationDummyMetric() | Calculates the quality of the dummy model built on the same data. This can serve as a baseline. | Required: n/a Optional: n/a |
ClassificationQualityMetric() | Calculates various classification performance metrics, incl. precision, accuracy, recall, F1-score, TPR, TNR, FPR, and FNR. For probabilistic classification, also: ROC AUC score, LogLoss. | Required:: n/a Optional:
|
ClassificationClassBalance() | Calculates the number of objects for each label. Plots the histogram. | Required: n/a Optional: n/a |
ClassificationConfusionMatrix() | Calculates the TPR, TNR, FPR, FNR, and plots the confusion matrix. | Required: n/a Optional:
|
ClassificationQualityByClass() | Calculates the classification quality metrics for each class. Plots the matrix. | Required: n/a Optional:
|
ClassificationClassSeparationPlot() | Visualization of the predicted probabilities by class. Applicable for probabilistic classification only. | Required: n/a Optional: n/a |
ClassificationProbDistribution() | Visualization of the probability distribution by class. Applicable for probabilistic classification only. | Required: n/a Optional: n/a |
ClassificationRocCurve() | Plots ROC Curve. Applicable for probabilistic classification only. | Required: n/a Optional: n/a |
ClassificationPRCurve() | Plots Precision-Recall Curve. Applicable for probabilistic classification only. | Required: n/a Optional: n/a |
ClassificationPRTable() | Calculates the Precision-Recall table that shows model quality at a different decision threshold. | Required: n/a Optional: n/a |
ClassificationQualityByFeatureTable() | Plots the relationship between feature values and model quality. | Required: n/a Optional:
|
Regression
All metrics are dataset-level.
Metric name | Description | Parameters |
---|---|---|
RegressionDummyMetric() | Calculates the quality of the dummy model built on the same data. This can serve as a baseline. | Required: n/a Optional: n/a |
RegressionQualityMetric() | Calculates various regression performance metrics, incl. Mean Error, MAE, MAPE, etc. | Required: n/a Optional: n/a |
RegressionPredictedVsActualScatter() | Visualizes predicted vs actual values in a scatter plot. | Required: n/a Optional: n/a |
RegressionPredictedVsActualPlot() | Visualizes predicted vs. actual values in a line plot. | Required: n/a Optional: n/a |
RegressionErrorPlot() | Visualizes the model error (predicted - actual) in a line plot. | Required: n/a Optional: n/a |
RegressionAbsPercentageErrorPlot() | Visualizes the absolute percentage error in a line plot. | Required: n/a Optional: n/a |
RegressionErrorDistribution() | Visualizes the distribution of the model error in a histogram. | Required: n/a Optional: n/a |
RegressionErrorNormality() | Visualizes the quantile-quantile plot (Q-Q plot) to estimate value normality. | Required: n/a Optional: n/a |
RegressionTopErrorMetric() | Calculates the regression performance metrics for different groups: top-X% of predictions with overestimation, top-X% of predictions with underestimation, and the rest. Visualizes the group division on a scatter plot with predicted vs. actual values. | Required: n/a Optional:
|
RegressionErrorBiasTable() | Plots the relationship between feature values and model quality per group (for top-X% error groups, as above). | Required: n/a Optional:
|
Ranking and Recommendations
All metrics are dataset-level. Check individual metric descriptions here.
Optional shared parameters for multiple metrics:
no_feedback_users: bool = False
. Specifies whether to include the users who did not select any of the items, when computing the quality metric. Default: False.min_rel_score: Optional[int] = None
. Specifies the minimum relevance score to consider relevant when calculating the quality metrics for non-binary targets (e.g., if a target is a rating or a custom score).
Metric name | Description | Parameters |
---|---|---|
RecallTopKMetric() | Calculates the recall at | Required:
Optional:
|
PrecisionTopKMetric() | Calculates the precision at | Required:
Optional:
|
FBetaTopKMetric() | Calculates the F-measure at | Required:
Optional:
|
MAPKMetric() | Calculates the Mean Average Precision (MAP) at | Required:
Optional:
|
MARKMetric() | Calculates the Mean Average Recall (MAR) at | Required:
Optional:
|
NDCGKMetric() | Calculates the Normalized Discounted Cumulative Gain at | Required:
Optional:
|
MRRKMetric() | Calculates the Mean Reciprocal Rank (MRR) at | Required:
Optional:
|
HitRateKMetric() | Calculates the hit rate at | Required:
Optional:
|
DiversityMetric() | Calculates intra-list Diversity at | Required:
Optional:
|
NoveltyMetric() | Calculates novelty at | Required:
Optional:
|
SerendipityMetric() | Calculates serendipity at | Required:
Optional:
|
PersonalizationMetric() | Measures the average uniqueness of each user's top-K recommendations. | Required:
Optional:
|
PopularityBias() | Evaluates the popularity bias in recommendations by computing ARP (average recommendation popularity), Gini index, and coverage. Requires a training dataset | Required:
Optional:
|
ItemBiasMetric() | Visualizes the distribution of recommendations by a chosen dimension (column), сomparative to its distribution in the training set. Requires a training dataset. | Required:
Optional:
|
UserBiasMetric() | Visualizes the distribution of the chosen category (e.g. user characteristic), comparative to its distribution in the training dataset. Requires a training dataset. | Required:
Optional:
|
ScoreDistribution() | Computes the predicted score entropy. Visualizes the distribution of the scores at | Required:
Optional:
|
RecCasesTable() | Shows the list of recommendations for specific user IDs (or 5 random if not specified). | Required:
Optional:
|
Last updated