dotnet / dotnet/machinelearning-samples

Update Ranking Sample for NDCG Truncation Level

Abierto
#607 0 comentarios 0 reacciones 1 asignado Reclamado por @nicolehaugen Ver en GitHub
Lenguaje dominante
PowerShell
Estrellas
4.7k
Forks
2.7k
Merge medio
2 d 22 h
PR fusionados (30 d)
1

Descripción

There's a PR out to allow the user to set the truncation level for the DCG/NDCG metics:
https://github.com/dotnet/machinelearning/pull/4081/

In our sample, we currently are using reflection to set this truncation level:
https://github.com/dotnet/machinelearning-samples/blob/f50535f048df3b6e7b41c2093b5c9027030b5359/samples/csharp/getting-started/Ranking_Web/WebRanking/Common/ConsoleHelper.cs#L32-L40

Task: We should use the public method to set the DCG/NDCG truncation level once available (after the PR).

We may also want to show off how to get the NDCG metric at multiple thresholds, similar to the TensorFlow ranking example: ([link](https://github.com/tensorflow/ranking/blob/46dfc825b3782a4b928431a499e5ff09078dca63/tensorflow_ranking/examples/tf_ranking_libsvm.ipynb))
```python
metric_fns.update({
"metric/ndcg@%d" % topn: tfr.metrics.make_ranking_metric_fn(
tfr.metrics.RankingMetricKey.NDCG, topn=topn)
for topn in [1, 3, 5, 10]
})
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.