DateTrainTestLeakageOverlap#

class DateTrainTestLeakageOverlap[source]#

Check test data that is dated earlier than the latest date in train.

Parameters
n_samplesint , default: 1_000_000

number of samples to use for this check.

random_stateint, default: 42

random seed for all check internals.

__init__(n_samples: int = 1000000, random_state: int = 42, **kwargs)[source]#
__new__(*args, **kwargs)#

Methods

DateTrainTestLeakageOverlap.add_condition(...)

Add new condition function to the check.

DateTrainTestLeakageOverlap.add_condition_leakage_ratio_less_or_equal([...])

Add condition - require leakage ratio be less or equal to the threshold.

DateTrainTestLeakageOverlap.clean_conditions()

Remove all conditions from this check instance.

DateTrainTestLeakageOverlap.conditions_decision(result)

Run conditions on given result.

DateTrainTestLeakageOverlap.config([...])

Return check configuration (conditions' configuration not yet supported).

DateTrainTestLeakageOverlap.from_config(conf)

Return check object from a CheckConfig object.

DateTrainTestLeakageOverlap.from_json(conf)

Deserialize check instance from JSON string.

DateTrainTestLeakageOverlap.metadata([...])

Return check metadata.

DateTrainTestLeakageOverlap.name()

Name of class in split camel case.

DateTrainTestLeakageOverlap.params([...])

Return parameters to show when printing the check.

DateTrainTestLeakageOverlap.remove_condition(index)

Remove given condition by index.

DateTrainTestLeakageOverlap.run(...[, ...])

Run check.

DateTrainTestLeakageOverlap.run_logic(context)

Run check.

DateTrainTestLeakageOverlap.to_json([indent])

Serialize check instance to JSON string.

Examples#