BPt.EvalResultsSubset.subset_by#
- EvalResultsSubset.subset_by(group, dataset=None, decode_values=True)[source]#
Generate instances of
EvalResultsSubset
based on subsets of subjects based on different unique groups.This method is used to analyze results as broken down by the different unique groups of a column in the passed
Dataset
.Note that the train subjects in resulting breakdown will not change, that only the validation sets will be split by group.
- Parameters
- groupstr
The name of a column within the passed dataset that defines the different subsets of subjects. This column must be categorical and have no missing values.
- 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
- decode_valuesbool
If the original values of the group column were encoded via a
Dataset
function, this if True, this function will try to represent values by their original name rather than the name used internally. If False, then the internal ordinal number value will be used.default = True
- Returns
- subsetsdict of
EvalResultsSubset
- Returns a dictionary of
EvalResultsSubset
, where keys are generated as a representation of the value stored for each unique group. If decode_values is True, then these values are the original names otherwise they are the internal names.Saved under each key is an instance ofEvalResultsSubset
, which can be treated the same as an instance ofEvalResults
, except it has a subset of values for val_subjects, and different preds and scores representing this subset.
- subsetsdict of