vertices_est: The vertex hunting in the Topic SCORE algorithm

Description Usage Arguments Value Author(s) References Examples

Description

This function conducts the vertex hunting in the Topic SCORE algorithm. More generally this function finds a simplex with K vertices that best approximates the given p data points in a (K-1) dimensional space.

Usage

1
vertices_est(R, K0, m, num_restart)

Arguments

R

The p-by-(K-1) data matrix, with each row being a data point.

K0

The number of greedy search steps.

m

The number of centers in the kmeans step.

num_restart

The number of random start in the kmeans step.

Value

A list containing

V

The K-by-(K-1) vertices matrix, with each row being a vertex in the found simplex.

theta

The K0-by-(K-1) matrix of potential K0 vertices found in the greedy step.

Author(s)

Minzhe Wang

References

Ke, Z. T., & Wang, M. (2017). A new SVD approach to optimal topic estimation. arXiv preprint arXiv:1704.07016.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Generate 3 vertices
V <- rbind(c(-1/2,-1/2), c(1,0), c(0,1))

# Randomly generate the convex combination weights of 1000 points
Pi <- matrix(runif(3*1000),3,1000)
Pi <- apply(Pi, 2, function(x){x/sum(x)})

R <- t(Pi)%*%V
v_est_obj <- vertices_est(R, 1.5*3, 10*3, 1)

# Visualize the result
plot(R[,1], R[,2])
points(v_est_obj$V[,1], v_est_obj$V[,2], col=2, lwd=5)

TopicScore documentation built on June 6, 2019, 5:06 p.m.