calculate_covariate_drift: Calculate Covariate Drift for two data frames

Description Usage Arguments Value Examples

Description

Here covariate drift is defined as Non-Intersection Distance between two distributions. More formally, $$d(P,Q) = 1 - sum_i min(P_i, Q_i)$$. The larger the distance the more different are two distributions.

Usage

1
calculate_covariate_drift(data_old, data_new, bins = 20)

Arguments

data_old

data frame with 'old' data

data_new

data frame with 'new' data

bins

continuous variables are discretized to 'bins' intervals of equal sizes

Value

an object of a class 'covariate_drift' (data.frame) with Non-Intersection Distances

Examples

1
2
3
4
5
6
7
library("DALEX")
# here we do not have any drift
d <- calculate_covariate_drift(apartments, apartments_test)
d
# here we do have drift
d <- calculate_covariate_drift(dragons, dragons_test)
d

drifter documentation built on May 31, 2019, 5:04 p.m.