ImageSegmentPerformance#

class ImageSegmentPerformance[source]#

Segment the data by various properties of the image, and compare the performance of the segments.

Parameters
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 / label properties, see the guide about Data Properties.

alternative_metricsDict[str, Metric], default: None

A dictionary of metrics, where the key is the metric name and the value is an ignite. Metric object whose score should be used. If None are given, use the default metrics.

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_show_topint , default: 3

number of properties to show (shows by top diffrence by first metric)

__init__(image_properties: Optional[List[Dict[str, Any]]] = None, alternative_metrics: Optional[Dict[str, Metric]] = None, number_of_bins: int = 5, number_of_samples_to_infer_bins: int = 1000, n_to_show: int = 3, **kwargs)[source]#
__new__(*args, **kwargs)#

Methods

ImageSegmentPerformance.add_condition(name, ...)

Add new condition function to the check.

ImageSegmentPerformance.add_condition_score_from_mean_ratio_greater_than([ratio])

Calculate for each property & metric the mean score and compares ratio between the lowest segment score and the mean score.

ImageSegmentPerformance.clean_conditions()

Remove all conditions from this check instance.

ImageSegmentPerformance.compute(context, ...)

Calculate segment performance based on image properties.

ImageSegmentPerformance.conditions_decision(result)

Run conditions on given result.

ImageSegmentPerformance.config([include_version])

Return check configuration (conditions' configuration not yet supported).

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

Return check object from a CheckConfig object.

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

Deserialize check instance from JSON string.

ImageSegmentPerformance.initialize_run(...)

Initialize run before starting updating on batches.

ImageSegmentPerformance.metadata([with_doc_link])

Return check metadata.

ImageSegmentPerformance.name()

Name of class in split camel case.

ImageSegmentPerformance.params([show_defaults])

Return parameters to show when printing the check.

ImageSegmentPerformance.remove_condition(index)

Remove given condition by index.

ImageSegmentPerformance.run(dataset[, ...])

Run check.

ImageSegmentPerformance.to_json([indent])

Serialize check instance to JSON string.

ImageSegmentPerformance.update(context, ...)

Update the bins by the image properties.

Examples#