# FilteredDCG

This function is usually used to assess the quality of ranking.

## Calculation principlesCalculation principles

The calculation of this function consists of the following steps:

1. Filter out all objects with negative predicted relevancies ($a_i$).

2. The FilteredDCG metric is calculated for each group ($group \in groups$) with filtered objects.

The calculation principle depends on the specified value of the type and denominator parameters:

type/denominator LogPosition Position
Base $FilteredDCG(group) = \sum\limits_{i}\displaystyle\frac{t_{g(i,group)}}{log_{2}(i+1)}$ $FilteredDCG(group) = \sum\limits_{i}\displaystyle\frac{t_{g(i,group)}}{i}$
Exp $FilteredDCG(group) = \sum\limits_{i}\displaystyle\frac{2^{t_{g(i,group)}} - 1}{log_{2}(i+1)}$ $FilteredDCG(group) = \sum\limits_{i}\displaystyle\frac{2^{t_{g(i,group)}} - 1}{i}$

$t_{g(i, group)}$ is the label value for the i-th object in the group after filtering objects with negative predicted relevancies.

3. The aggregated value of the metric for all groups is calculated as follows:
$FilteredDCG = \frac{\sum\limits_{group \in groups} FilteredDCG(group)}{|groups|}$

## User-defined parametersUser-defined parameters

### typetype

#### DescriptionDescription

Metric calculation principles.

Possible values:

• Base
• Exp

Default: Base

### denominatordenominator

#### DescriptionDescription

Metric denominator type.

Possible values:

• LogPosition
• Position

Default: Position