afe {wordmap}R Documentation

Compute Average Feature Entropy (AFE)

Description

afe() computes Average Feature Entropy (AFE), which measures randomness of occurrences of features in labelled documents (Watanabe & Zhou, 2020). In creating seed dictionaries, AFE can be used to avoid adding seed words that would decrease classification accuracy.

Usage

afe(x, y, smooth = 1)

Arguments

x

a dfm for features.

y

a dfm for labels.

smooth

a numeric value for smoothing to include all the features.

Value

Returns a single numeric value.

References

Watanabe, Kohei & Zhou, Yuan (2020). "Theory-Driven Analysis of Large Corpora: Semisupervised Topic Classification of the UN Speeches". doi:10.1177/0894439320907027. Social Science Computer Review.


[Package wordmap version 0.8.0 Index]