Learn R Programming

quanteda (version 1.3.13)

influence.predict.textmodel_affinity: Compute feature influence from a predicted textmodel_affinity object

Description

Computes the influence of features on scaled textmodel_affinity applications.

Usage

# S3 method for predict.textmodel_affinity
influence(model, subset = !train,
  ...)

Arguments

model

a predicted textmodel_affinity object

subset

whether to use all data or a subset (for instance, exclude the training set)

...

unused

See Also

influence.lm

Examples

Run this code
# NOT RUN {
af <- textmodel_affinity(data_dfm_lbgexample, y = c("L", NA, NA, NA, "R", NA))
afpred <- predict(af) 
influence(afpred)
# }

Run the code above in your browser using DataLab