Skip to content

Ranker defaults to a ranking order given the same values #320

@EdenShaveet

Description

@EdenShaveet

The Ranker transformer appears to default to assigning different ranks when the values of the specified ranking field are the same.

For instance, when Ranker is applied as follows on a corpus of Tweets:

ranker = Ranker(
    obj_type = "utterance",
    score_func = lambda utt: utt.meta["overall_engagement"],
    score_attribute_name = "overall_engagement",
    rank_attribute_name = "rank_within_conversation"
)

A ranking order is imposed by default when there is no inherent order based on the specified field:

Image

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