new_score_obj {filtro}R Documentation

Construct a new score object

Description

Create a new score object that contains associated metadata, such as range, fallback_value, score_type, direction, and other relevant attributes.

Usage

new_score_obj(
  subclass = c("cat_num", "cat_cat", "num_num", "any"),
  outcome_type = c("numeric", "factor"),
  predictor_type = c("numeric", "factor"),
  case_weights = NULL,
  range = NULL,
  inclusive = NULL,
  fallback_value = NULL,
  score_type = NULL,
  trans = NULL,
  sorts = NULL,
  direction = NULL,
  deterministic = NULL,
  tuning = NULL,
  ties = NULL,
  calculating_fn = NULL,
  label = NULL,
  ...
)

Arguments

subclass

A character string indicating the type of predictor-outcome combination the scoring method supports. One of:

  • "cat_num"

  • "cat_cat"

  • "num_num"

  • "any"

outcome_type

A character string indicating the outcome type. One of:

  • "numeric"

  • "factor"

predictor_type

A character string indicating the predictor type. One of:

  • "numeric"

  • "factor"

case_weights

A logical value, indicating whether the model accepts case weights (TRUE) or not (FALSE).

range

A numeric vector of length two, specifying the minimum and maximum possible values, respectively.

inclusive

A logical vector of length two, indicating whether the lower and upper bounds of the range are inclusive (TRUE) or exclusive (FALSE).

fallback_value

A numeric scalar used as a fallback value. Typical values include:

  • 0

  • 1

  • Inf

score_type

A character string indicating the type of scoring metric to compute. Available options include:

  • ANOVA F-Test: "fstat", "pval"

  • Correlation: "pearson", "spearman"

  • Cross Tabulation: "pval_chisq", "pval_fisher"

  • Random Forest:"imp_rf", "imp_rf_conditional", "imp_rf_oblique"

  • Information Gain: "infogain", "gainratio", "symuncert"

  • ROC AUC: "roc_auc"

trans

Currently not used.

sorts

An optional function used to sort the scores. Common options include:

  • identity

  • abs

  • function(score) max(score, 1 - score)

direction

A character string indicating the optimization direction. One of:

  • "maximize"

  • "minimize"

  • "target"

deterministic

A logical value, indicating whether the score is deterministic (TRUE) or not (FALSE).

tuning

A logical value, indicating whether the model should be tuned (TRUE) or not (FALSE).

ties

An optional logical value indicating whether ties in score can occur (TRUE) or not (FALSE).

calculating_fn

An optional function used to compute the score. A default function is selected based on the score_type.

label

A named character string that can be used for printing and plotting.

...

Currently not used.

Value

A score object.

Examples

# Create a score object
new_score_obj()

[Package filtro version 0.1.0 Index]