Plot rate curve
plot_rate_curve(x_values, y_values, plot_type='success_rate')
Plot success rate, prediction rate or ROC curve.
Plot type depends on plot_type argument. Y-axis is always true positive rate, while x-axis can be either false positive rate (roc) or proportion of area (success and prediction rate) depending on plot type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_values |
Union[ndarray, Series]
|
False positive rate values or proportion of area values. |
required |
y_values |
Union[ndarray, Series]
|
True positive rate values. |
required |
plot_type |
Literal[success_rate, prediction_rate, roc]
|
Plot type. Can be either: "success_rate", "prediction_rate" or "roc". |
'success_rate'
|
Returns:
Type | Description |
---|---|
Figure
|
Success rate, prediction rate or ROC plot figure object. |
Raises:
Type | Description |
---|---|
InvalidParameterValueException
|
Invalid plot type. |
InvalidParameterValueException
|
x_values or y_values are out of bounds. |
Source code in eis_toolkit/validation/plot_rate_curve.py
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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|