influence.predict.textmodel_affinity.Rd
Computes the influence of features on scaled textmodel_affinity applications.
# S3 method for predict.textmodel_affinity influence(model, subset = !train, ...)
model | a predicted textmodel_affinity object |
---|---|
subset | whether to use all data or a subset (for instance, exclude the training set) |
... | unused |
tmot <- textmodel_affinity(data_dfm_lbgexample, y = c("L", NA, NA, NA, "R", NA)) pred <- predict(tmot) influence(pred)#> Top 30 influential words: #> #> count median max direction #> Y 2 7.576025e-03 1.505203e-02 R #> Z 2 2.272671e-03 4.466192e-03 R #> ZA 2 1.517405e-03 2.981017e-03 R #> O 3 4.847547e-04 6.879185e-02 L #> N 3 3.919919e-04 3.346596e-02 L #> X 3 2.928133e-04 3.346596e-02 R #> P 4 2.701610e-04 1.006349e-01 L #> M 3 2.688997e-04 1.505203e-02 L #> Q 4 2.251359e-04 1.352534e-01 L #> W 3 2.042000e-04 6.879185e-02 R #> U 4 1.741103e-04 1.352534e-01 R #> L 3 1.558427e-04 4.466192e-03 L #> V 4 1.378416e-04 1.006349e-01 R #> K 3 7.634040e-05 2.981017e-03 L #> J 2 3.289667e-05 3.473071e-05 L #> ZB 1 3.106263e-05 3.106263e-05 R #> ZC 1 1.518987e-05 1.518987e-05 R #> I 2 1.280577e-05 1.518987e-05 L #> H 2 6.924294e-06 6.945949e-06 L #> ZD 1 6.902639e-06 6.902639e-06 R #> G 1 2.068877e-06 2.068877e-06 L #> ZE 1 2.068877e-06 2.068877e-06 R #> F 1 1.376422e-06 1.376422e-06 L #> ZF 1 1.376422e-06 1.376422e-06 R #> A 0 0.000000e+00 0.000000e+00 <NA> #> B 0 0.000000e+00 0.000000e+00 <NA> #> C 0 0.000000e+00 0.000000e+00 <NA> #> D 0 0.000000e+00 0.000000e+00 <NA> #> E 0 0.000000e+00 0.000000e+00 <NA> #> R 0 0.000000e+00 0.000000e+00 <NA>