mapie.conformity_scores.AbsoluteConformityScore¶
- class mapie.conformity_scores.AbsoluteConformityScore[source]¶
Absolute conformity score.
The signed conformity score = y - y_pred. The conformity score is symmetrical.
This is appropriate when the confidence interval is symmetrical and its range is approximatively the same over the range of predicted values.
- get_estimation_distribution(y_pred: Union[numpy._typing._array_like._SupportsArray[numpy.dtype], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], conformity_scores: Union[numpy._typing._array_like._SupportsArray[numpy.dtype], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]) numpy.ndarray[Any, numpy.dtype[numpy._typing._generic_alias.ScalarType]][source]¶
Compute samples of the estimation distribution from the predicted values and the conformity scores, from the following formula: signed conformity score = y - y_pred <=> y = y_pred + signed conformity score
- get_signed_conformity_scores(y: Union[numpy._typing._array_like._SupportsArray[numpy.dtype], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], y_pred: Union[numpy._typing._array_like._SupportsArray[numpy.dtype], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]) numpy.ndarray[Any, numpy.dtype[numpy._typing._generic_alias.ScalarType]][source]¶
Compute the signed conformity scores from the predicted values and the observed ones, from the following formula: signed conformity score = y - y_pred