LogoLogo
HomeBlogGitHub
latest
latest
  • New DOCS
  • What is Evidently?
  • Get Started
    • Evidently Cloud
      • Quickstart - LLM tracing
      • Quickstart - LLM evaluations
      • Quickstart - Data and ML checks
      • Quickstart - No-code evaluations
    • Evidently OSS
      • OSS Quickstart - LLM evals
      • OSS Quickstart - Data and ML monitoring
  • Presets
    • All Presets
    • Data Drift
    • Data Quality
    • Target Drift
    • Regression Performance
    • Classification Performance
    • NoTargetPerformance
    • Text Evals
    • Recommender System
  • Tutorials and Examples
    • All Tutorials
    • Tutorial - Tracing
    • Tutorial - Reports and Tests
    • Tutorial - Data & ML Monitoring
    • Tutorial - LLM Evaluation
    • Self-host ML Monitoring
    • LLM as a judge
    • LLM Regression Testing
  • Setup
    • Installation
    • Evidently Cloud
    • Self-hosting
  • User Guide
    • 📂Projects
      • Projects overview
      • Manage Projects
    • 📶Tracing
      • Tracing overview
      • Set up tracing
    • 🔢Input data
      • Input data overview
      • Column mapping
      • Data for Classification
      • Data for Recommendations
      • Load data to pandas
    • 🚦Tests and Reports
      • Reports and Tests Overview
      • Get a Report
      • Run a Test Suite
      • Evaluate Text Data
      • Output formats
      • Generate multiple Tests or Metrics
      • Run Evidently on Spark
    • 📊Evaluations
      • Evaluations overview
      • Generate snapshots
      • Run no code evals
    • 🔎Monitoring
      • Monitoring overview
      • Batch monitoring
      • Collector service
      • Scheduled evaluations
      • Send alerts
    • 📈Dashboard
      • Dashboard overview
      • Pre-built Tabs
      • Panel types
      • Adding Panels
    • 📚Datasets
      • Datasets overview
      • Work with Datasets
    • 🛠️Customization
      • Data drift parameters
      • Embeddings drift parameters
      • Feature importance in data drift
      • Text evals with LLM-as-judge
      • Text evals with HuggingFace
      • Add a custom text descriptor
      • Add a custom drift method
      • Add a custom Metric or Test
      • Customize JSON output
      • Show raw data in Reports
      • Add text comments to Reports
      • Change color schema
    • How-to guides
  • Reference
    • All tests
    • All metrics
      • Ranking metrics
    • Data drift algorithm
    • API Reference
      • evidently.calculations
        • evidently.calculations.stattests
      • evidently.metrics
        • evidently.metrics.classification_performance
        • evidently.metrics.data_drift
        • evidently.metrics.data_integrity
        • evidently.metrics.data_quality
        • evidently.metrics.regression_performance
      • evidently.metric_preset
      • evidently.options
      • evidently.pipeline
      • evidently.renderers
      • evidently.report
      • evidently.suite
      • evidently.test_preset
      • evidently.test_suite
      • evidently.tests
      • evidently.utils
  • Integrations
    • Integrations
      • Evidently integrations
      • Notebook environments
      • Evidently and Airflow
      • Evidently and MLflow
      • Evidently and DVCLive
      • Evidently and Metaflow
  • SUPPORT
    • Migration
    • Contact
    • F.A.Q.
    • Telemetry
    • Changelog
  • GitHub Page
  • Website
Powered by GitBook
On this page
  • Recommendation Quality Report
  • Code example
  • How it works
  • Data Requirements
  • Report customization
  • Recommender System Test Suite
  • Code example
  • How it works
  • Test Suite customization
  1. Presets

Recommender System

PreviousText EvalsNextTutorials and Examples

Last updated 2 months ago

You are looking at the old Evidently documentation: this API is available with versions 0.6.7 or lower. Check the newer version .

TL;DR: You can monitor and analyze the performance of a recommender system.

  • Report: for visual analysis or metrics export, use the RecsysPreset.

  • Test Suite: for pipeline checks, use the RecsysTestPreset.

Recommendation Quality Report

If you want to visually explore the model performance, create a new Report object and include the RecsysPreset.

Code example

report = Report(metrics=[
    RecsysPreset(k=5),
])
column_mapping = ColumnMapping(recommendations_type='rank', target='rating', prediction='rank', item_id='title', user_id='user_id')
report.run(
    reference_data=reference,
    current_data=current,
    column_mapping=column_mapping,
    additional_data={'current_train_data': train_data}
  )
report

How it works

The Recommender System Performance report evaluates the quality of a recommender system. It can also compare the performance against the past, or the performance of an alternative model.

  • Works for a single model or helps compare the two.

  • Displays 10+ plots related to the predictive quality, ranking quality and recommendation diversity.

  • Helps explore recommendation bias and examples of recommendations.

Data Requirements

  • To run this report, you need to have both target (true relevance) and prediction (rank or score) columns available. Additional training data and input features are required for some of the metrics.

  • To generate a comparative report, you will need two datasets. The reference dataset serves as a benchmark, e.g. past model performance or a performance of a different model. Evidently analyzes the change by comparing the current production data to the reference data.

  • You can also run this report for a single dataset, with no comparison performed.

  • You must perform column mapping to map the data inputs correctly.

Report customization

  • You can pass user_bias_columns columns or item_bias_columns you want to evaluate for bias.

  • You can pass display_features you want to display in the recommendation cases table.

  • You can pass user_ids: List to specify which users you want to display in the recommendation cases table.

Recommender System Test Suite

If you want to run recommender system performance checks as part of a pipeline, you can create a Test Suite and include the RecsysTestPreset.

Code example


tests = TestSuite(tests=[
    RecsysTestPreset(k=5)
])

column_mapping = ColumnMapping(recommendations_type='rank', target='rating', prediction='rank', item_id='title', user_id='user_id')
tests.run(
    reference_data=reference,
    current_data=current,
    column_mapping=column_mapping,
    additional_data={'current_train_data': train_data}
  )
tests

How it works

You can use the RecsysTestPreset to evaluate the quality of a recommender or ranking system, when you have the ground truth data (relevance scores).

  • It compares ranking quality metrics against the defined expectation.

  • For Evidently to generate the test conditions automatically, you should pass the reference dataset (e.g., performance during the previous period). You can also set the performance expectations manually by passing custom test conditions.

Test Suite customization

  • You can set custom test conditions.

Check the for an end-to-end example on a sample dataset.

Check the for a complete list of metrics and parameters. Check the for an explanation of each metric.

Check the guide and instructions on using in recommendations.

You can use a .

If you want to exclude some metrics, you can create a custom report by combining the chosen metrics. See the complete list

Check the for a complete list of metrics and parameters.

Head here to the table to see the composition of each preset and default parameters.

If you want to exclude some tests or add additional ones, you can create a custom test suite by combining the chosen tests. See the complete list .

here
How-to example
All Metrics Table
Ranking Metrics Guide
Column Mapping
Additional Data
different color schema for the report
here
All Metrics Table
All tests
here