Learn R Programming

svs (version 1.0.2)

fast_lsa: Latent Semantic Analysis

Description

A fast procedure for computing latent semantic analysis.

Usage

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:
  • valThe singular values, indicating how much each latent axis explains.
  • pos1The coordinates of the first set of levels (viz. the row levels of a frequency table).
  • pos2The coordinates of the second set of levels (viz. the column levels of a frequency table).

Examples

Run this code
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8")
lsa.SndT_Fra <- fast_lsa(SndT_Fra)
lsa.SndT_Fra
}
references{
Deerwester, S., S. T. Dumais, G. W. Furnas, Th. K. Landauer and R. Harshman (1990) Indexing by latent semantic analysis.
  emph{Journal of the American society for information science} strong{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. emph{Psychological review} strong{104}, 211--240.
}

Run the code above in your browser using DataLab