nlptest.transform.accuracy.BaseAccuracy#
- class BaseAccuracy#
Bases:
ABC
Abstract base class for implementing accuracy measures.
- alias_name#
A name or list of names that identify the accuracy measure.
- Type:
str
- transform(data
List[Sample]) -> Any: Transforms the input data into an output based on the implemented accuracy measure.
- __init__()#
Methods
__init__
()async_run
(sample_list, y_true, y_pred, **kwargs)Creates a task to run the accuracy measure.
run
(sample_list, y_true, y_pred, **kwargs)transform
(y_true)Abstract method that implements the accuracy measure.
Attributes
- async classmethod async_run(sample_list: List[MinScoreSample], y_true, y_pred, **kwargs)#
Creates a task to run the accuracy measure.
- Parameters:
sample_list (List[MinScoreSample]) – List of samples to be transformed.
y_true (List[Any]) – True values
y_pred (List[Any]) – Predicted values
- abstract static transform(y_true: List[Any])#
Abstract method that implements the accuracy measure.
- Parameters:
y_true (List[Any]) – True values
y_pred (List[Any]) – Predicted values
params (Dict) – parameters for tests configuration
- Returns:
The transformed data based on the implemented accuracy measure.
- Return type:
List[MinScoreSample]