BPt.EvalResults.get_X_transform_df#
- EvalResults.get_X_transform_df(dataset=None, fold=0, subjects='tr', nested_model=True, trans_y=False)[source]#
This method is used as a helper for getting the transformed input data for one of the saved models run during evaluate.
- Parameters
- dataset
Dataset
The instance of
Dataset
originally passed toevaluate()
.Note
If a different dataset is passed, then unexpected behavior may occur.
If left as default=None, then will try to use a shallow copy of the dataset passed to the original evaluate call (assuming evaluate was run with store_data_ref=True).default = None
- foldint, optional
The corresponding fold of the trained estimator to use.
- subjects‘tr’, ‘val’ or Subjects, optional
The subjects data in which to return. As either special strings ‘tr’ for train subjects in the corresponding fold. Special str ‘val’ for the validation subjects in the selected for or lastly any valid Subjects style input.
default = 'tr'
- nested_modelbool, optional
In the case where the final estimator is itself a nested pipeline, the user may want to apply any of those transformations too. If passed as True, then these transformed features will apply to the fitted estimators self._nested_final_estimator, which may not be the same a the base self._final_estimator.
Note: In the case of some complex nested ensemble, this method may break.
default = False
- trans_ybool, optional
Can optionally try to tranform y along with X, this is experimental designed to work with samplers. Default is False, as not 100% confident will work correctly in all cases.
default = False
- dataset
- Returns
- X_trans_dfpandas DataFrame
The transformed features in a DataFrame, according to the saved estimator from a fold, for the specified subjects.
If kept as the default of subjects == ‘tr’, then these represent the feature values as passed to trained the actual model component of the pipeline.