Skip to content

Tests are wrong? #18

@JMMackenzie

Description

@JMMackenzie

I think some of the failing tests might actually be wrong.

For example, consider:

assert result.lower_bound == pytest.approx(0.744, rel=1e-3), f"Lower bound {result.lower_bound} does not match expected value 0.744"

This test is computing RBP with phi = 0.8 on the ranking [ [1], [2], [3], ..., [25] ]with positive docs [1] and [2] and negative document [3].

The lower-bound RBP score should thus be:

((1 - 0.8 ) / 0.8 ) * (0.8 ^ 1 + 0.8 ^ 2) = 0.360

since docs [1] and [2] are both relevant at ranks 1 and 2.

Could someone please verify? We'll need to check the other tests carefully too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions