dataeval.detectors.drift.DriftCVM ================================= .. py:class:: dataeval.detectors.drift.DriftCVM(x_ref, p_val = 0.05, x_ref_preprocessed = False, update_x_ref = None, preprocess_fn = None, correction = 'bonferroni', n_features = None) :term:`Drift` detector employing the :term:`Cramér-von Mises (CVM) Drift Detection` test. The CVM test detects changes in the distribution of continuous univariate data. For multivariate data, a separate CVM test is applied to each feature, and the obtained p-values are aggregated via the Bonferroni or :term:`False Discovery Rate (FDR)` corrections. :param x_ref: Data used as reference distribution. :type x_ref: ArrayLike :param p_val: :term:`p-value` used for significance of the statistical test for each feature. If the FDR correction method is used, this corresponds to the acceptable q-value. :type p_val: float | None, default 0.05 :param x_ref_preprocessed: Whether the given reference data ``x_ref`` has been preprocessed yet. If ``True``, only the test data ``x`` will be preprocessed at prediction time. If ``False``, the reference data will also be preprocessed. :type x_ref_preprocessed: bool, default False :param update_x_ref: Reference data can optionally be updated using an UpdateStrategy class. Update using the last n instances seen by the detector with LastSeenUpdateStrategy or via reservoir sampling with ReservoirSamplingUpdateStrategy. :type update_x_ref: UpdateStrategy | None, default None :param preprocess_fn: Function to preprocess the data before computing the data drift metrics. Typically a :term:`dimensionality reduction` technique. :type preprocess_fn: Callable | None, default None :param correction: Correction type for multivariate data. Either 'bonferroni' or 'fdr' (False Discovery Rate). :type correction: "bonferroni" | "fdr", default "bonferroni" :param n_features: Number of features used in the statistical test. No need to pass it if no preprocessing takes place. In case of a preprocessing step, this can also be inferred automatically but could be more expensive to compute. :type n_features: int | None, default None .. py:method:: score(x) Performs the two-sample Cramér-von Mises test(s), computing the :term:`p-value` and test statistic per feature. :param x: Batch of instances. :type x: ArrayLike :returns: Feature level p-values and CVM statistic :rtype: tuple[NDArray, NDArray]