textmodel_affinity-internal: Internal methods for textmodel_affinity

textmodel_affinity-internalR Documentation

Internal methods for textmodel_affinity

Description

Internal print and summary methods for derivative textmodel_affinity objects.

Usage

## S3 method for class 'influence.predict.textmodel_affinity'
print(x, n = 30, ...)

## S3 method for class 'influence.predict.textmodel_affinity'
summary(object, ...)

## S3 method for class 'summary.influence.predict.textmodel_affinity'
print(x, n = 30, ...)

Arguments

n

how many coefficients to print before truncating

Value

summary.influence.predict.textmodel_affinity() returns a list classes as summary.influence.predict.textmodel_affinity that includes:

  • word the feature name

  • count the total counts of each feature for which influence was computed

  • mean, median, sd, max mean, median, standard deviation, and maximum values of influence for each feature, computed across classes

  • direction an integer vector of 1 or 2 indicating the class which the feature is influencing

  • rate a document by feature class sparse matrix of normalised influence measures

  • count a vector of counts of each non-zero feature in the input matrix

  • rate the median of rate from influence.predict.textmodel_affinity()

  • support logical vector for each feature matching the same return from predict.textmodel_affinity()

the mean, the standard deviation, the direction of the influence, the rate, and the support


quanteda.textmodels documentation built on Sept. 11, 2024, 8:19 p.m.