WeakSegmentsPerformance#
- class WeakSegmentsPerformance[source]#
Search for segments with low performance scores.
The check is designed to help you easily identify weak spots of your model and provide a deepdive analysis into its performance on different segments of your data. Specifically, it is designed to help you identify the model weakest segments in the data distribution for further improvement and visibility purposes.
The segments are based on the image properties - characteristics of each image such as the contrast.
In order to achieve this, the check trains several simple tree based models which try to predict the error of the user provided model on the dataset. The relevant segments are detected by analyzing the different leafs of the trained trees.
- Parameters
- scorer: Optional[Callable], default: None
a scorer (metric) to override the default scorer, callable that accepts (predictions, labels) and returns the score per sample.
- scorer_name: Optional[str], default: None
The scorer name to display in the plots.
- image_propertiesList[Dict[str, Any]], default: None
List of properties. Replaces the default deepchecks properties. Each property is a dictionary with keys
'name'
(str),method
(Callable) and'output_type'
(str), representing attributes of said method. ‘output_type’ must be one of:'numeric'
- for continuous ordinal outputs.'categorical'
- for discrete, non-ordinal outputs. These can still be numbers, but these numbers do not have inherent value.
For more on image properties, see the guide about Data Properties.
- number_of_bins: int, default5
Maximum number of bins to segment a single property into.
- number_of_samples_to_infer_binsint, default1000
Minimum number of samples to use to infer the bounds of the segments’ bins
- n_top_properties: int , default: 5
Number of features to use for segment search. Top columns are selected based on feature importance.
- n_to_show: int , default: 3
number of segments with the weakest performance to show.
- segment_minimum_size_ratio: float , default: 0.05
Minimum size ratio for segments. Will only search for segments of size >= segment_minimum_size_ratio * data_size.
- __init__(scorer: Optional[Callable] = None, scorer_name: Optional[str] = None, image_properties: Optional[List[Dict[str, Any]]] = None, number_of_bins: int = 5, number_of_samples_to_infer_bins: int = 1000, n_top_properties: int = 5, n_to_show: int = 3, segment_minimum_size_ratio: float = 0.05, **kwargs)[source]#
- __new__(*args, **kwargs)#
Methods
|
Add new condition function to the check. |
|
Add condition - check that the score of the weakest segment is greater than supplied relative threshold. |
Remove all conditions from this check instance. |
|
|
Find the segments with the worst performance. |
Run conditions on given result. |
|
Return check configuration (conditions' configuration not yet supported). |
|
|
Return check object from a CheckConfig object. |
|
Deserialize check instance from JSON string. |
Initialize the properties and sample scores states. |
|
|
Return check metadata. |
Name of class in split camel case. |
|
|
Return parameters to show when printing the check. |
Remove given condition by index. |
|
|
Run check. |
|
Serialize check instance to JSON string. |
|
Calculate the image properties and scores per image. |