libuplift.model_selection.cv#

Functions#

uplift_check_cv(cv, y, trt, n_trt, *[, classifier, ...])

Return a correct crossvalidator cv and stratification target

Module Contents#

libuplift.model_selection.cv.uplift_check_cv(cv, y, trt, n_trt, *, classifier=False, y_stratify=None)[source]#

Return a correct crossvalidator cv and stratification target y_stratify.

By default the returned stratification target is the treatment for regression and cross of treatment and target for classification. If y_stratify is provided it is used instead and returned unchanged.