ballet.validation.feature_api.checks module

class ballet.validation.feature_api.checks.CanDeepcopyCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the feature can be deepcopied

This is needed for execution of the overall transformation pipeline

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanFitCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that fit can be called on reference data

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanFitOneRowCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that fit can be called on one row of reference data

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanFitTransformCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that fit_transform can be called on reference data

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanMakeMapperCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the feature can be converted to a FEP

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanPickleCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the feature can be pickled

This is needed for saving the pipeline to disk

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanTransformCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that transform can be called on reference data

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanTransformNewRowsCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that transform can be called on new, unseen rows

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.CanTransformOneRowCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that transform can be called on one row of reference data

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.FeatureApiCheck(X_df, y_df)[source]

Bases: ballet.validation.base.BaseCheck

Base class for implementing new Feature API checks

Parameters
  • X_df (array-like) – X dataframe

  • y_df (array-like) – y dataframe

class ballet.validation.feature_api.checks.HasCorrectInputTypeCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the feature’s input is a str or Iterable[str]

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.HasCorrectOutputDimensionsCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the dimensions of the transformed data are correct

For input X, an n x p array, a n x q array should be produced, where q is the number of feature values produced by the feature.

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.HasTransformerInterfaceCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the feature has a fit/transform/fit_tranform interface

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.IsFeatureCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the object is an instance of ballet.Feature

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.NoInfiniteValuesCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the output of the transformer has no non-finite values

give_advice(feature)[source]

Description of how to resolve if the check fails

class ballet.validation.feature_api.checks.NoMissingValuesCheck(X_df, y_df)[source]

Bases: ballet.validation.feature_api.checks.FeatureApiCheck

check(feature)[source]

Check that the output of the transformer has no missing values

give_advice(feature)[source]

Description of how to resolve if the check fails