所以我已经将我的语料库转换成一个不错的 word2vec 矩阵。该矩阵是具有负数和正数的浮点矩阵。
我似乎无法得到无限的狄利克雷过程来给我任何有凝聚力的答案。
示例输出 [for 2 steps] 如下所示:
original word2vec matrix:
[[-0.09597077 -0.1617426 -0.01935256 ..., 0.03843787 -0.11019679
0.02837373]
[-0.20119116 0.09759717 0.1382935 ..., -0.08172804 -0.14392921
-0.08032629]
[-0.04258473 0.03070175 0.11503845 ..., -0.10350088 -0.18130976
-0.02993774]
...,
[-0.08478324 -0.01961064 0.02305113 ..., -0.01231162 -0.10988192
0.00473828]
[ 0.13998444 0.05631495 0.00559074 ..., 0.05252389 -0.14202785
-0.03951728]
[-0.02888418 -0.0327519 -0.09636743 ..., 0.10880557 -0.08889513
-0.08584201]]
Running DGPMM for 20 clusters of shape (4480, 100)
Bound after updating z: -1935576384.727921
Bound after updating gamma: -1935354454.981427
Bound after updating mu: -1935354033.389434
Bound after updating a and b: -inf
Cluster proportions: [ 4.48098985e+03 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00]
covariance_type: full
Bound after updating z: -inf
Bound after updating gamma: -inf
Bound after updating mu: -inf
Bound after updating a and b: -inf
Cluster proportions: [ 4.48098985e+03 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00
1.00053406e+00 1.00053406e+00 1.00053406e+00 1.00053406e+00]
可以观察到,看起来 z、gamma 和 mu 都爆炸了,最终系统收敛到仅 1 个集群,这并不准确。我曾尝试为 DPGMM 摆弄 alpha,但它并没有真正改变太多。
我正在尝试做的是使用自治聚类系统自动聚类更接近含义的单词。K-Means 需要我不想提供的“K”。