train_models_indexical_subsample_holdout: Train indexical group models with holdout and subsampling...

Description Usage Arguments Value

Description

Like train_models_indexical_with_holdout, but randomly sub-samples training data to have specified number of talkers.

Usage

1
2
train_models_indexical_subsample_holdout(d, groups, n_subsample, category, cues,
  holdout = "Talker", ...)

Arguments

d

data frame (a la 'nsp_vows')

groups

quoted name of indexical grouping variable column (e.g., 'Dialect'). One model will be created for each level of this variable.

n_subsample

Number of holdout levels to subsample for training data.

category

quoted name of column for linguistic category. Each indexical group's model is a list of individual category models

cues

quoted name(s) of column(s) with cue values

holdout

='Talker' unit to perform cross-validation on. one row per level of this variable is created with models trained after removing the corresponding level.

...

additional arguments are passed to train_models

Value

the dataframe returned by train_test_split, with data_train replaced by the subsampled version for each talker, plus a models list column, each entry of which is a model for one level of groups after holding out that row's Talker (or level of holdout).


kleinschmidt/phondisttools documentation built on May 20, 2019, 5:57 p.m.