nlptest.transform.accuracy.MinF1Score#

class MinF1Score#

Bases: BaseAccuracy

Subclass of BaseAccuracy that implements the minimum precision score.

alias_name#

The name “min_precision_score” 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(y_true, y_pred, **kwargs)

Computes the minimum F1 score for the given data.

transform(y_true, params)

Computes the minimum F1 score for the given data.

Attributes

alias_name

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

async run(y_true, y_pred, **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

static transform(y_true: List[Any], params: Dict)#

Computes the minimum F1 score for the given data.

Parameters:
  • y_true (List[Any]) – True values

  • y_pred (List[Any]) – Predicted values

  • params (Dict) – parameters for tests configuration

Returns:

F1 score test results.

Return type:

List[MinScoreSample]