langtest.transform.accuracy.MinBLEUcore#
- class MinBLEUcore#
Bases:
BaseAccuracy
Subclass of BaseAccuracy that implements the minimum precision score.
- alias_name#
The name for config.
- Type:
str
- transform(y_true, y_pred) Any #
Creates accuracy test results.
- __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)Computes the minimum F1 score for the given data.
transform
(test, y_true, params)Computes the minimum F1 score for the given data.
Attributes
supported_tasks
test_types
- async classmethod async_run(sample_list: List[MinScoreSample], y_true: List[Any], y_pred: List[Any], **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
- async static run(sample_list: List[MinScoreSample], y_true: List[Any], y_pred: List[Any], **kwargs)#
Computes the minimum F1 score for the given data.
- Parameters:
sample_list (List[MinScoreSample]) – List of samples to be transformed.
y_true (List[Any]) – True values
y_pred (List[Any]) – Predicted values
- classmethod transform(test: str, y_true: List[Any], params: Dict) List[MinScoreSample] #
Computes the minimum F1 score for the given data.
- Parameters:
y_true (List[Any]) – True values
params (Dict) – parameters for tests configuration
- Returns:
The transformed data based on the minimum F1 score.
- Return type:
List[MinScoreSample]