Learn R Programming

heuristica (version 1.0.3)

validityWeightModel: Validity Weight Model, a linear model weighted by cue validities

Description

Validity Weight Model is a linear model with weights calculated by cueValidity.

Usage

validityWeightModel(
  train_data,
  criterion_col,
  cols_to_fit,
  reverse_cues = TRUE,
  fit_name = "validityWeightModel"
)

Arguments

train_data

Training/fitting data as a matrix or data.frame.

criterion_col

The index of the column in train_data that has the criterion.

cols_to_fit

A vector of column indices in train_data, used to fit the criterion.

reverse_cues

Optional parameter to reverse cues as needed. By default, the model will reverse the cue values for cues with cue validity < 0.5, so a cue with validity 0 becomes a cue with validity 1. Set this to FALSE if you do not want that, i.e. the cue stays validity 0.

fit_name

Optional The name other functions can use to label output. It defaults to the class name.

Value

An object of class validityWeightModel. This is a list containing at least the following components:

  • "cue_validities": A list of cue validities for the cues in order of cols_to_fit.

  • "linear_coef": Same as cue validities for this model.

See Also

cueValidity for the metric used to to determine cue direction.

predictPair for predicting whether row1 is greater.

predictPairProb for predicting the probability row1 is greater.