Skip to main content

Definition

The column drift test allows you to select a dataset column, specify a drift detection method, and set a threshold for the drift score. Drift is measured by comparing the selected column on the current dataset with a reference dataset.
  • In development projects, the training set is used as the reference and the validation set as the current dataset.
  • In monitoring projects, the reference dataset is uploaded by the user and the production data is the current dataset.
If you want Openlayer to automatically find the best drift detection method and threshold, you can use the Feature drift, and Label drift tests instead.

Taxonomy

  • Task types: LLM, tabular classification, tabular regression, text classification.
  • Availability: and .

Why it matters

  • Measuring drift is crucial to maintain the relevance of your models. In development, it allows you to ensure that the data you use to validate your model is similar to the data you used to train it. In monitoring, it allows you to detect when the data your model is receiving is different from the data considered as reference.
  • Over time, changes in the underlying data distribution can degrade the performance of your model. Measuring drift helps in identifying these changes early, enabling timely updates or retraining of the model to maintain its performance.

Drift detection methods

One of the parameters that you must pass to the column drift test is the drift detection method. This is the method that will be used to compare the specified columns in the datasets and compute a drift score, which is what you apply a threshold to. Drift methods Openlayer supports different drift detection methods, namely:
Note that not all drift detection methods apply to all column types. For example, the “Kolmogorov-Smirnov (KS) test” is only available for numerical columns, the “Text content drift” method is only available for text columns, etc.If you select an invalid method for a column, the test will be skipped and you will see a message with the justification in the test report.String-valued columns are auto-detected as text at evaluation time, even when you list them in categoricalFeatureNames. The categorical methods in the table above (Chi-Square, Jensen-Shannon Distance, Hellinger Distance, PSI, G-test, etc.) all apply to the categorical/numerical types and will error on a text-typed column with Stattest ... isn't applicable to feature of type text. For a string column, the method that works is Text Content Drift (the only method that applies to text columns). Reserve the categorical methods for columns whose values are numeric-coded categories; use numeric methods such as K-S Test for numerical columns.

Test configuration examples

If you are writing a tests.json, here are a few valid configurations for the character length test: