weighting_functions {svs}R Documentation

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)

Arguments

x

A numeric matrix.

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):

Global weighting functions, weighting the columns of the matrix (hence, these weighting functions work according to expectation for a document-term matrix, i.e. with the documents as the rows and the terms as the columns):

Value

A numeric matrix.

See Also

fast_lsa.

Examples

SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8",
   stringsAsFactors = FALSE)
tab.SndT_Fra <- table(SndT_Fra)
lw_log(tab.SndT_Fra)
gw_idf(tab.SndT_Fra)

[Package svs version 3.0.0 Index]