问题标签 [self-organizing-maps]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
machine-learning - Is it right to normalize data and/or weight vectors in a SOM?
So I am being stumped by something that (should) be simple:
I have written a SOM for a simple 'play' two-dimensional data set. Here is the data:
You can make out 3 clusters by yourself.
Now, there are two things that confuse me. The first is that the tutorial that I have, normalizes the data before the SOM gets to work on it. This means, it normalizes each data vector to have length 1. (Euclidean norm). If I do that, then the data looks like this:
(This is because all the data has been projected onto the unit circle).
So, my question(s) are as follows:
1) Is this correct? Projecting the data down onto the unit circle seems to be bad, because you can no longer make out 3 clusters... Is this a fact of life for SOMs? (ie, that they only work on the unit circle).
2) The second related question is that not only are the data normalized to have length 1, but so are the weight vectors of each output unit after every iteration. I understand that they do this so that the weight vectors dont 'blow up', but it seems wrong to me, since the whole point of the weight vectors is to retain distance information. If you normalize them, you lose the ability to 'cluster' properly. For example, how can the SOM possibly distinguish between the cluster on the lower left, from the cluster on the upper right, since they project down to the unit circle the same way?
I am very confused by this. Should data be normalized to unit length in SOMs? Should the weight vectors be normalized as well?
Thanks!
EDIT
Here is the data, saved as a .mat file for MATLAB. It is a simple 2 dimensional data set.
matlab - MATLAB 中的 SOM 内存不足
我正在尝试使用 SOM 来学习 80000X10 个样本(每个样本都是一个大小为 10 的向量)。但我什至不能用 10000X1 样本配置 8x8 网络。它抛出“内存不足”错误。
这是我的代码(数据是 80000X10 矩阵):
Matlab 帮助:“未配置的网络在第一次调用 train 时会自动配置和初始化。”
即使是 8000X1 的数据集,也需要很多时间。我注意到一个巨大numWeightElements: 512000
的net
变量(8 * 8 * 8000 = 512000)。重量应为 8*8。SOM 训练算法不应该使用这么多内存。怎么了?
内存命令的输出:
algorithm - 采样信号的相似度算法(数学)
假设我已经对一些信号进行了采样,并为每个信号构建了一个样本向量。计算这些向量的(不)相似度的最有效方法是什么?请注意,采样的偏移量不得计算在内,例如 sin 和 cos 信号的采样向量应该被认为是相似的,因为它们在顺序上是完全相同的。
有一种简单的方法是通过“滚动”另一个向量的单位,计算每个滚动点的欧几里得距离并最终选择最佳匹配(最小距离)。这个解决方案工作得很好,因为我唯一的目标是从向量池中找到输入信号最相似的样本向量。
但是,当向量的维数增长时,上述解决方案也非常低效。与 N 维向量的“非序列向量匹配”相比,序列向量的计算距离要多 N 倍。
是否有任何更高/更好的数学/算法来比较具有不同偏移量的两个序列?
用例是使用 SOM 进行序列相似性可视化。
编辑:比较每个向量的积分和熵怎么样?它们都是“序列安全的”(= 时不变的?)并且计算速度非常快,但我怀疑它们本身是否足以区分所有可能的信号。除了这些,还有其他东西可以使用吗?
EDIT2: Victor Zamanian 的回复不是直接的答案,但它给了我一个可能的想法。解决方案可能是通过计算它们的傅里叶变换系数并将它们插入到样本向量中来对原始信号进行采样。第一个元素 (X_0) 是信号的平均值或“水平”,随后的 (X_n) 可直接用于比较与其他样本向量的相似性。n 越小,它对相似性计算的影响就越大,因为用 FT 计算的系数越多,FT 信号的表示就越准确。这带来了一个额外的问题:
假设我们有 FT-6 采样向量(值刚刚从天而降)
- X = {4, 15, 10, 8, 11, 7}
- Y = {4, 16, 9, 15, 62, 7}
这些向量的相似度值可以这样计算:|16-15| + (|10 - 9| / 2 ) + (|8 - 15| / 3 ) + (|11-62| / 4 ) + (|7-7| / 5 )
那些加粗的是奖金问题。是否有一些系数/其他方式可以知道每个 FT 系数对与其他系数的相似性有多大影响?
self-organizing-maps - 轻量级无监督学习方法,如自组织地图
我正在尝试开发一个轻量级系统,该系统使用无监督学习方法,该方法使用 CPU、RAM 利用率等系统参数来训练异常检测系统。除了自组织地图,我想不出任何东西。我可以在这里考虑其他任何学习技巧吗?
artificial-intelligence - SOM(自组织地图)和 K-Means 有什么区别?
stackoverflow中只有一个与此相关的问题,更多的是关于哪个更好。我只是不明白其中的区别。我的意思是它们都使用随机分配给集群的向量,它们都使用不同集群的质心以确定获胜的输出节点。我的意思是,区别到底在哪里?
machine-learning - 了解 Kohonen SOM 可视化
我正在尝试了解(并实现)如何在 SOM 中可视化节点。如果我在一些高维数据上训练它,我唯一能做的就是计算高维空间中节点之间的距离。我想绘制一些漂亮的散点图甚至网格,但是如何?
r - 无监督 SOM 可视化
需要绘制无监督矩形 SOM 模型的结果。附加要求:1)将每个节点绘制成饼图,并带有对应的观察类;图表的大小应反映节点中的样本数量。默认plot.kohonen
不适合这种情况。
neural-network - 使用 SOM 降低数据的维度
作为学校项目的一部分,我不得不阅读 Steven Lawrence 的一篇关于使用 SOM 和 CCN 检测人脸的论文。对于那些好奇的人,这里的论文:http ://clgiles.ist.psu.edu/papers/UMD-CS-TR-3608.face.hybrid.neural.nets.pdf
在论文的第 12 页,Lawrence 描述了他如何使用 SOM 来降低人脸数据的维度。但是,我不明白这是如何工作的。在此示例中,Lawrence 使用 5x5x5 SOM,输入向量为 25D。如果我的理解是正确的,那么当训练过程完成时,你会留下一个 25D 向量,连接到网络中的每个神经元。那么,这如何减少数据的维度呢?自组织地图上的降维数据到底在哪里?我在很多地方进行了研究,但由于某种原因,我找不到这个问题的答案。由于这个问题已经困扰了我一段时间,如果有人可以为我回答,将不胜感激。