tfr.keras.losses.NDCGLambdaWeightV2

Keras serializable class for NDCG LambdaWeight V2 for topn.

topn (int) The topn for the DCG metric.
gain_fn (function) Transforms labels.
rank_discount_fn (function) The rank discount function.
normalized (bool) If True, normalize weight by the max DCG.

Methods

get_config

View source

individual_weights

View source

See _LambdaWeight.

pair_weights

View source

See _LambdaWeight.