Shortcuts

Fbeta#

ignite.metrics.Fbeta(beta, average=True, precision=None, recall=None, output_transform=None, device=device(type='cpu'))[source]#

Calculates F-beta score.

Fβ=(1+β2)precisionrecall(β2precision)+recallF_\beta = \left( 1 + \beta^2 \right) * \frac{ \text{precision} * \text{recall} } { \left( \beta^2 * \text{precision} \right) + \text{recall} }

where β\beta is a positive real factor.

Parameters
  • beta (float) – weight of precision in harmonic mean

  • average (bool) – if True, F-beta score is computed as the unweighted average (across all classes in multiclass case), otherwise, returns a tensor with F-beta score for each class in multiclass case.

  • precision (Optional[Precision]) – precision object metric with average=False to compute F-beta score

  • recall (Optional[Recall]) – recall object metric with average=False to compute F-beta score

  • output_transform (Optional[Callable]) – a callable that is used to transform the Engine’s process_function’s output into the form expected by the metric. It is used only if precision or recall are not provided.

  • device (Union[str, device]) – specifies which device updates are accumulated on. Setting the metric’s device to be the same as your update arguments ensures the update method is non-blocking. By default, CPU.

Returns

MetricsLambda, F-beta metric

Return type

MetricsLambda