SegmentPerformance#

class SegmentPerformance[source]#

Display performance score segmented by 2 top (or given) features in a heatmap.

Deprecated since version 0.8.1: The SegmentPerformance check is deprecated and will be removed in the 0.11 version. Please use the WeakSegmentsPerformance check instead.

Parameters
feature_1Optional[Hashable] , default: None

feature to segment by on y-axis.

feature_2Optional[Hashable] , default: None

feature to segment by on x-axis.

alternative_scorerTuple[str, Union[str, Callable]] , default: None

Score to show, either function or sklearn scorer name. If is not given a default scorer (per the model type) will be used.

max_segmentsint , default: 10

maximal number of segments to split the values into.

n_samplesint , default: 1_000_000

number of samples to use for this check.

random_stateint, default: 42

random seed for all check internals.

__init__(feature_1: Optional[Hashable] = None, feature_2: Optional[Hashable] = None, alternative_scorer: Optional[Tuple[str, Union[str, Callable]]] = None, max_segments: int = 10, n_samples: int = 1000000, random_state: int = 42, **kwargs)[source]#
__new__(*args, **kwargs)#

Attributes

SegmentPerformance.feature_1

SegmentPerformance.feature_2

SegmentPerformance.alternative_scorer

SegmentPerformance.max_segments

Methods

SegmentPerformance.add_condition(name, ...)

Add new condition function to the check.

SegmentPerformance.clean_conditions()

Remove all conditions from this check instance.

SegmentPerformance.conditions_decision(result)

Run conditions on given result.

SegmentPerformance.config([include_version])

Return check instance config.

SegmentPerformance.from_config(conf[, ...])

Return check object from a CheckConfig object.

SegmentPerformance.from_json(conf[, ...])

Deserialize check instance from JSON string.

SegmentPerformance.metadata([with_doc_link])

Return check metadata.

SegmentPerformance.name()

Name of class in split camel case.

SegmentPerformance.params([show_defaults])

Return parameters to show when printing the check.

SegmentPerformance.remove_condition(index)

Remove given condition by index.

SegmentPerformance.run(dataset[, model, ...])

Run check.

SegmentPerformance.run_logic(context, ...)

Run check.

SegmentPerformance.to_json([indent])

Serialize check instance to JSON string.

Examples#