ballet.validation.feature_acceptance.validator module¶
-
class
ballet.validation.feature_acceptance.validator.
AlwaysAccepter
(X_df, y_df, X_df_val, y_val, features, candidate_feature)[source]¶
-
class
ballet.validation.feature_acceptance.validator.
CompoundAccepter
(*args, agg='all', specs=[])[source]¶ Bases:
ballet.validation.base.FeatureAccepter
A compound accepter that runs a list of individual accepters
An accepter spec is just a simple serialization of a class and its kwargs:
name: ballet.validation.feature_acceptance.validator.CompoundAccepter params: agg: any specs: - name: ballet.validation.feature_acceptance.validator.VarianceThresholdAccepter params: threshold: 0.1 - name: ballet.validation.feature_acceptance.validator.MutualInformationAccepter params: threshold: 0.1
- Parameters
agg – one of
'all'
or'any'
; whether to accept if all underlying accepters accept or if any accepter accepts.specs (
List
[dict
]) – list of dicts of accepter specs
-
class
ballet.validation.feature_acceptance.validator.
GFSSFAccepter
(*args, lmbda_1=0.0, lmbda_2=0.0, lambda_1_adjustment=64, lambda_2_adjustment=64)[source]¶ Bases:
ballet.validation.base.FeatureAcceptanceMixin
,ballet.validation.gfssf.GFSSFPerformanceEvaluator
-
class
ballet.validation.feature_acceptance.validator.
MutualInformationAccepter
(*args, threshold=0.05, handle_nan_targets='fail')[source]¶ Bases:
ballet.validation.base.FeatureAccepter
Accept features with mutual information with the target above a threshold
- Parameters
threshold – mutual information threshold
handle_nan_targets – one of
'fail'
or'ignore'
, whether to fail validation if NaN-valued targets are discovered or to drop those rows in calculation of the mutual information score
-
class
ballet.validation.feature_acceptance.validator.
NeverAccepter
(X_df, y_df, X_df_val, y_val, features, candidate_feature)[source]¶
-
class
ballet.validation.feature_acceptance.validator.
RandomAccepter
(*args, p=0.3, seed=None)[source]¶ Bases:
ballet.validation.base.FeatureAcceptanceMixin
,ballet.validation.common.RandomFeaturePerformanceEvaluator
-
class
ballet.validation.feature_acceptance.validator.
VarianceThresholdAccepter
(*args, threshold=0.05)[source]¶ Bases:
ballet.validation.base.FeatureAccepter
Accept features with variance above a threshold
- Parameters
threshold – variance threshold