Skip to content

Bug in ndcg_score #52

@fabridamicelli

Description

@fabridamicelli

this is the function to compute the score which is wrong.
The normalized score will be always 1 since "best" and "actual" are the same

pub fn ndcg_score(y_true: &Array, y_hat: &Array, k: i32) -> f32 {
    assert!(y_true.rows() == y_hat.rows());
    let best = dcg_score(y_true, y_hat, k);          <------------ this is the same as                                 
    let actual = dcg_score(y_true, y_hat, k);      <-------------this
    actual / best
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions