跳到内容

通过使用一种规范的方法找到陡坡图的“肘部”来选择显著奇异值的数量。

用法

dim_select(sv)

参数

sv

一个数值向量,有序的奇异值。

一个数值标量,\(d\)的估计值。

详细信息

该函数的输入是一个数值向量,其中包含每个维度的“重要性”度量。

对于谱嵌入,这些是邻接矩阵的奇异值。假设奇异值是从具有不同均值和相同方差的两个分量的高斯混合分布生成的。选择维度\(d\)是为了在将\(d\)个最大奇异值分配给混合的一个分量并将剩余的奇异值分配给另一个分量时最大化似然性。

该函数也可用于一般分离问题,其中我们假设向量的左侧和右侧来自两个均值不同的正态分布,并且我们想知道它们的边界。请参见以下示例。

参考文献

M. Zhu 和 A. Ghodsi (2006)。通过使用剖面似然性从陡坡图中自动选择维度。计算统计和数据分析, 第 51 卷,918–930。

作者

Gabor Csardi csardi.gabor@gmail.com

dim_select().

示例


# Generate the two groups of singular values with
# Gaussian mixture of two components that have different means
sing.vals <- c(rnorm(10, mean = 1, sd = 1), rnorm(10, mean = 3, sd = 1))
dim.chosen <- dim_select(sing.vals)
dim.chosen
#> [1] 18

# Sample random vectors with multivariate normal distribution
# and normalize to unit length
lpvs <- matrix(rnorm(200), 10, 20)
lpvs <- apply(lpvs, 2, function(x) {
  (abs(x) / sqrt(sum(x^2)))
})
RDP.graph <- sample_dot_product(lpvs)
dim_select(embed_adjacency_matrix(RDP.graph, 10)$D)
#> [1] 1

# Sample random vectors with the Dirichlet distribution
lpvs.dir <- sample_dirichlet(n = 20, rep(1, 10))
RDP.graph.2 <- sample_dot_product(lpvs.dir)
dim_select(embed_adjacency_matrix(RDP.graph.2, 10)$D)
#> [1] 1

# Sample random vectors from hypersphere with radius 1.
lpvs.sph <- sample_sphere_surface(dim = 10, n = 20, radius = 1)
RDP.graph.3 <- sample_dot_product(lpvs.sph)
dim_select(embed_adjacency_matrix(RDP.graph.3, 10)$D)
#> [1] 1