BPt.CVStrategy#

class BPt.CVStrategy(groups=None, stratify=None, train_only_subjects=None)[source]#

This objects is used to encapsulate a set of parameters representing a cross-validation strategy.

Parameters
groupsstr or None, optional

The str should refer to the column key in which to preserve groups by during any CV splits. To create a combination of unique values, use Dataset.add_unique_overlap().

Note: the passed column must be of type category as well.

default = None
stratifystr or None, optional

The str input should refer to a loaded non input variable which if of type category. It will assign it as a value to preserve distribution of groups by during any during any CV splits.

To create a combination of unique values, use Dataset.add_unique_overlap().

Note: the passed column must be of type category as well.

Any target_cols passed must be categorical or binary, and cannot be float. Though you may consider creating a binary / k bin copy of a float / cont. type target variable.

default = None
train_only_subjectsNone or Subjects, optional

If passed any valid Subjects style input here, these subjects will be condiered train only and will be assigned to every training fold, and never to a testing or validation fold.

default = None

Methods

copy()

This method returns a deepcopy of the base object.

get_params([deep])

Get parameters for this estimator.

set_params(**params)

Set the parameters of this estimator.