fast_lsa: Latent Semantic Analysis

Description Usage Arguments Value References Examples

View source: R/svs.r

Description

A fast procedure for computing latent semantic analysis.

Usage

1
2
3
fast_lsa(dat, local_weights = "log", global_weights = "idf")

fast_lsi(dat, local_weights = "log", global_weights = "idf")

Arguments

dat

Input data: can be a table or a data frame (but the data frame must have only two columns).

local_weights

Character specification of the local weighting function (without a prefix): see Weighting functions.

global_weights

Character specification of the global weighting function (without a prefix): see Weighting functions.

Value

A list with components:

val

The singular values, indicating how much each latent axis explains.

pos1

The coordinates of the first set of levels (viz. the row levels of a frequency table).

pos2

The coordinates of the second set of levels (viz. the column levels of a frequency table).

References

Deerwester, S., S. T. Dumais, G. W. Furnas, Th. K. Landauer and R. Harshman (1990) Indexing by latent semantic analysis. Journal of the American society for information science 41 (6), 391–407.

Landauer, Th. K. and S. T. Dumais (1997) A solution to Plato's problem: the latent semantic analysis theory of the acquisition, induction, and representation of knowledge. Psychological review 104, 211–240.

Examples

1
2
3
4
5
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8",
   stringsAsFactors = FALSE)
lsa.SndT_Fra <- fast_lsa(SndT_Fra)
lsa.SndT_Fra

svs documentation built on Nov. 10, 2020, 1:09 a.m.