model_features: Model features

Description Usage Arguments Value

View source: R/model-features.R

Description

This function fits a sequential conditional logit model that predicts chord voicings from chord features.

Usage

1
2
3
model_features(x, features = attr(x, "features"),
  formula = linear_formula(x, features), keep_model = TRUE,
  eval_model = TRUE, perm_int = TRUE, verbose = TRUE)

Arguments

x

A corpus's feature analysis as created by get_corpus_features.

features

(Character vector) Features to model, corresponding to columns of x. By default this is extracted from the metadata of x, and corresponds to all computed features.

formula

(Formula) The formula used to predict chord voicings. The default is created by linear_formula, and corresponds to a simple linear combination of the features specified in the features argument.

keep_model

(Logical scalar) Determines whether the returned object should include the fitted model from mclogit, which can be rather large.

eval_model

(Logical scalar) Whether to compute and return model evaluation metrics.

perm_int

(Logical scalar) Whether to compute and return permutation-based feature importance metrics (also known as model reliance metrics).

verbose

(Logical scalar) Whether to show progress messages during the computation.

Value

An object of class voicer_mod with the following slots:


pmcharrison/voicer documentation built on Dec. 17, 2020, 1:09 p.m.