pyreal.transformers.FeatureSelectTransformer#

class pyreal.transformers.FeatureSelectTransformer(columns, **kwargs)[source]#

A transformer that selects and re-orders features to match the model’s inputs

__init__(columns, **kwargs)[source]#

Initializes the transformer

Parameters:

columns (dataframe column label type or list of dataframe column label type) – Label of column to select, or an ordered list of column labels to select

Methods

__init__(columns, **kwargs)

Initializes the transformer

data_transform(x)

Reorders and selects the features in x

fit(x, **params)

Saves the columns being dropped

fit_transform(x, **fit_params)

Fits this transformer to data and then transforms the same data

inverse_data_transform(x_new)

Wrapper for inverse_data_transform.

inverse_transform(x_new)

Transforms data x_new from new feature space back into the original feature space.

inverse_transform_explanation(explanation)

Transforms the explanation from the second feature space handled by this transformer to the first.

inverse_transform_explanation_additive_feature_contribution(...)

Inverse transforms additive feature contribution explanations

inverse_transform_explanation_additive_feature_importance(...)

Inverse transforms additive feature importance explanations

inverse_transform_explanation_decision_tree(...)

Inverse transforms decision-tree explanations

inverse_transform_explanation_example(...)

Inverse transforms example-based explanations

inverse_transform_explanation_feature_based(...)

Sets the contribution of dropped features to 0 :param explanation: The explanation to be transformed :type explanation: FeatureBased

inverse_transform_explanation_feature_contribution(...)

Inverse transforms feature contribution explanations

inverse_transform_explanation_feature_importance(...)

Inverse transforms feature importance explanations

inverse_transform_explanation_similar_example(...)

Inverse transforms similar-example-based explanations

set_flags([model, interpret, algorithm])

transform(x)

Wrapper for data_transform.

transform_explanation(explanation)

Transforms the explanation from the first feature space handled by this transformer to the second.

transform_explanation_additive_feature_contribution(...)

Transforms additive feature contribution explanations

transform_explanation_additive_feature_importance(...)

Transforms additive feature importance explanations

transform_explanation_decision_tree(explanation)

Features cannot be removed from existing decision trees, so raise a BreakingTransformError

transform_explanation_example(explanation)

Transforms example-based explanations

transform_explanation_feature_based(explanation)

Selects the desired columns :param explanation: The explanation to be transformed :type explanation: FeatureBased

transform_explanation_feature_contribution(...)

Transforms feature contribution explanations

transform_explanation_feature_importance(...)

Transforms feature importance explanations

transform_explanation_similar_example(...)

Transforms example-based explanations