fast_psa {svs} | R Documentation |
Probabilistic Latent Semantic Analysis
Description
A fast procedure for computing probabilistic latent semantic analysis.
Usage
fast_psa(dat, k, symmetric = FALSE, transform = 1, tol = 1e-08)
fast_psi(dat, k, symmetric = FALSE, transform = 1, tol = 1e-08)
fast_plsa(dat, k, symmetric = FALSE, transform = 1, tol = 1e-08)
fast_plsi(dat, k, symmetric = FALSE, transform = 1, tol = 1e-08)
Arguments
dat |
Input data: can be a table or a data frame (but the data frame must have only two columns). |
k |
Numeric specification of the number of latent classes to compute. |
symmetric |
Logical indicating whether to compute the symmetric or the asymmetric solution. |
transform |
Numeric specification of the "tempering" transformation as explained in Hofmann (1999: 51-52). |
tol |
Numeric specification of the convergence criterion. |
Details
From version 1.1.0 of the svs package on, probabilistic latent semantic analysis is a special case of latent class analysis.
Value
A list with components:
prob0 |
The probabilities of the latent classes. |
prob1 |
The probabilities for the first set of levels (viz. the row levels of a frequency table). The rows of |
prob2 |
The probabilities for the second set of levels (viz. the column levels of a frequency table). The columns of |
References
Hofmann, Th. (1999). Probabilistic latent semantic indexing. SIGIR'99: Proceedings of the 22nd annual international SIGIR conference on research and development in information retrieval, 50–57.
Examples
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8",
stringsAsFactors = FALSE)
psa_SndT_Fra <- fast_psa(SndT_Fra, k = 7)
psa_SndT_Fra