Get P-A plot intersection point
get_pa_intersection(true_positive_rate_values, proportion_of_area_values, threshold_values)
Calculate the intersection point for prediction rate and area curves in (P-A plot).
Threshold_values values act as x-axis for both curves. Prediction rate curve uses true positive rate for y-axis. Area curve uses inverted proportion of area as y-axis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
true_positive_rate_values |
Union[ndarray, Series]
|
True positive rate values, values should be within range 0-1. |
required |
proportion_of_area_values |
Union[ndarray, Series]
|
Proportion of area values, values should be within range 0-1. |
required |
threshold_values |
Union[ndarray, Series]
|
Threshold values that were used to calculate true positive rate and proportion of area. |
required |
Returns:
Type | Description |
---|---|
Tuple[float, float]
|
X and y coordinates of the intersection point. |
Raises:
Type | Description |
---|---|
InvalidParameterValueException
|
true_positive_rate_values or proportion_of_area_values values are out of bounds. |
Source code in eis_toolkit/validation/get_pa_intersection.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|