Skip to content

Implement Consistent naming of scoring rules/metrics #610

@nikosbosse

Description

@nikosbosse

Replaces #476 and #401. Everyone ready for another round of naming discussions? 🙈

Here is a list of places that use the words scores, metrics, rules, score_names or something similar.

Functions

  • available_metrics() --> should be removed entirely
  • get_score_names() "Get Names Of The Scoring Rules That Were Used For Scoring"
  • validate_metrics() --> should probably be validate_scoring_rules()
  • apply_rules()
  • default scoring rules, e.g. rules_point() etc., + select_rules()

Function arguments

  • correlation(): "Correlation Between Metrics" --> Should be "Correlation between scores"
correlation <- function(scores,
                        metrics = NULL,
                        digits = NULL)

  • pairwise_comparison()
pairwise_comparison <- function(scores,
                                by = "model",
                                metric = "auto",
                                baseline = NULL,
                                ...)

  • add_pairwise_comparison()
add_pairwise_comparison <- function(scores,
                                    by = NULL,
                                    relative_skill_metric = "auto",
                                    baseline = NULL)

  • score() methods, e.g.
score.forecast_binary <- function(data, metrics = rules_binary(), ...)

Other

  • score_names is the attribute that holds the names of the scores/scoring rules used for scoring in score(). (that's what's returned by get_score_names()

Proposal

I suggest the following:

  • we call the scoring functions "scoring rules". (see Create documentation/vignette for the naming scheme of our functions #520)
  • we call the output of a scoring rule "score"
  • we call the name of the score "score name". In particular, "score name" would refer to the name of the column that holds the score. (I agree that "score name" is usually identical to the name of the scoring rule...)

This would result in the following function names/argument names:

  • get_score_names() - Returns the names of the scoring rules that were used for scoring - which correspond to the names of columns that hold the scores

  • validate_rules() validate_scoring_rules() - validates the scoring rules passed to score()

  • apply_rules() - applies the scoring rules inside score(). Could also rename to apply_scoring_rules()

  • default scoring rules like rules_point() etc., + select_rules() to select them

  • correlation(scores, score_names, digits) computes correlations between scores (the output of the scoring rules). score_names denotes the column names of those scores for which a correlation should be computed.

  • pairwise_comparison(scores, by, score_name, baseline, ...). Computes pairwise comparisons between two models based on the scores they achieved.

  • add_pairwise_comparison(scores, by, score_name, baseline, ...)

  • score.forecast_binary(data, rules =, ....) etc. (or alternatively, score.forecast_binary(data, scoring_rules =, ....)

Since we call the output of pairwise_comparison() something like wis_relative_skill, maybe the argument could also just be relative_skill

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions