weighting_functions: Weighting Functions
Description
Local and global weighting functions.Usage
lw_tf(x)
lw_raw(x)
lw_log(x)
lw_bin(x)
gw_idf(x)
gw_idf_alt(x)
gw_gfidf(x)
gw_nor(x)
gw_ent(x)
gw_bin(x)
gw_raw(x)
emph
- f(x) = log( ncol(x) / n + 1)
- n =
- f(x) = log( ncol(x) / n) + 1
- n =
- f(x) = rowSums(x) / n
- n =
- f(x) = x / sum(x)
- f(x) = 1 +
- f(x) = 1
- f(x) = 1
item
gw_idf_altgw_gfidfgw_norgw_entgw_bingw_raw
Details
There are many local and global weighting functions. In this package, local weighting functions are prefixed with lw_ and
global weighting functions with gw_, so users can define their own weighting functions.
Local weighting functions (i.e. weighting every cell in the matrix):
{Term frequency: f(x) = x.}
lw_raw {Raw frequency, which is the same as the term frequency: f(x) = x.}
lw_log {Logarithm: f(x) = log(x + 1).}
lw_bin {Binary: f(x) = 1 if x > 0 and 0 otherwise.}