BPt.EvalResults.subset_by#

EvalResults.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.

datasetDataset

The instance of Dataset originally passed to evaluate().

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 of EvalResultsSubset, which can be treated the same as an instance of EvalResults, except it has a subset of values for val_subjects, and different preds and scores representing this subset.