mapie.risk_control.SemanticSegmentationController

class mapie.risk_control.SemanticSegmentationController(predict_function: Callable[[ArrayLike], list[ndarray[tuple[Any, ...], dtype[_ScalarT]]] | ndarray[tuple[Any, ...], dtype[_ScalarT]]], risk: str = 'recall', method: str | None = None, target_level: float | Iterable[float] = 0.9, confidence_level: float | None = None, rcps_bound: str | None = None, predict_params: ArrayLike = np.arange(0, 1, 0.01), n_jobs: int | None = None, random_state: int | RandomState | None = None, verbose: int = 0)[source]

Risk controller for semantic segmentation tasks, inheriting from MultiLabelClassificationController.

__init__(predict_function: Callable[[ArrayLike], list[ndarray[tuple[Any, ...], dtype[_ScalarT]]] | ndarray[tuple[Any, ...], dtype[_ScalarT]]], risk: str = 'recall', method: str | None = None, target_level: float | Iterable[float] = 0.9, confidence_level: float | None = None, rcps_bound: str | None = None, predict_params: ArrayLike = np.arange(0, 1, 0.01), n_jobs: int | None = None, random_state: int | RandomState | None = None, verbose: int = 0) None
predict(X: ArrayLike) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Prediction sets on new samples based on the target risk level. Prediction sets for a given alpha are deduced from the computed risks.

Parameters:
X: ArrayLike of shape (n_samples, n_features)
Returns:
NDArray of shape (n_samples, n_classes, n_alpha)

Examples using mapie.risk_control.SemanticSegmentationController

Recall control for semantic segmentation

Recall control for semantic segmentation

Precision control for semantic segmentation

Precision control for semantic segmentation