# metrics

## Normalized Discount Cumulative Gain (NDCG)

class `cornac.metrics.``NDCG`(m=None)

  Normalized Discount Cumulative Gain.

  Parameters: | m (int, optional, default: None) – The number of items in the top@m list, if None then all items are considered to compute NDCG. name (string, value: 'NDCG') – Name of the measure. type (string, value: 'ranking') – Type of the metric, e.g., “ranking”.

## Normalized Cumulative Reciprocal Rank (NCRR)

class `cornac.metrics.``NCRR`(m=None)

  Normalized Cumulative Reciprocal Rank.

  Parameters: | m (int, optional, default: None) – The number of items in the top@m list, if None then all items are considered to compute NDCG. name (string, value: 'NCRR') – Name of the measure. type (string, value: 'ranking') – Type of the metric, e.g., “ranking”.

## Mean Reciprocal Rank (MRR)

class `cornac.metrics.``MRR`

  Mean Reciprocal Rank.

  Parameters: | name (string, value: 'MRR') – Name of the measure. type (string, value: 'ranking') – Type of the metric, e.g., “ranking”.

## Precision

class `cornac.metrics.``Precision`(m=20)

  Precision@M.

  Parameters: | m (int, optional, default: 20) – The number of items in the top@m list. name (string, value: 'Precision@m') – Name of the measure. type (string, value: 'ranking') – Type of the metric, e.g., “ranking”.

## Recall

class `cornac.metrics.``Recall`(m=20)

  Recall@M.

  Parameters: | m (int, optional, default: 20) – The number of items in the top@m list. name (string, value: 'Recall@m') – Name of the measure. type (string, value: 'ranking') – Type of the metric, e.g., “ranking”.

## Fmeasure (F1)

class `cornac.metrics.``FMeasure`(m=20)

  F-measure@M.

  Parameters: | m (int, optional, default: 20) – The number of items in the top@m list. name (string, value: 'F1@m') – Name of the measure. type (string, value: 'ranking') – Type of the metric, e.g., “ranking”.

## Mean Absolute Error (MAE)

class `cornac.metrics.``MAE`

  Mean Absolute Error.

  Parameters: | name (string, value: 'MAE') – Name of the measure. type (string, value: 'prediction') – Type of the metric, e.g., “ranking”, “prediction”.

## Root Mean Squared Error (RMSE)

class `cornac.metrics.``RMSE`

  Root Mean Squared Error.

  Parameters: | name (string, value: 'RMSE') – Name of the measure. type (string, value: 'prediction') – Type of the metric, e.g., “ranking”, “prediction”.