自组织图中神经元的位置取决于其权重吗?
我看过很多 SOM 的理论示例,但有一件事我不太清楚:节点的位置是否取决于它们的权重?例如,权重较大的节点是否会位于地图的一侧,而权重较小的节点会在地图上距离较远吗?
I've looked at a lot of theoretical examples of SOMs, but one thing is not really clear to me: is the location of nodes dependent on their weights? For example, will nodes with a larger weight be on one side of the map, while nodes with a smaller weight will be further away on the map?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不会。在 SOM(又名 Kohonen 地图)中,权重函数应用于您的数据,而不是“神经元”。
权重在地图构建(训练)期间使用,即在每次迭代时以及每次迭代中的每个晶格单元中计算。换句话说,对于包含地图构建的每次迭代,使用权重函数来缩放这些点在确定单元位置/地点中的贡献。
Kohonen 地图中数据点的位置由地图中最接近该数据点的晶格单元确定 - 即,构建 Kohonen 地图涉及将数据集中的每个点迭代重新分配为离它最近的格子中的单元格。
这是一种思考方式:Kohonen 地图只是将数据映射到二维的某些固定拓扑或晶格(例如规则网格)上。
训练阶段(构建地图)中的每次迭代都涉及将每个数据点(如有必要)重新分配给与其最近的格子中最近的单元。接下来,根据 (i) 从先前迭代分配给该单元的数据点来调整单元位置; (ii) 相邻单元格中的数据点。
(i) 和 (ii) 中的数据点的值如何影响像元位置的新值由每个数据点的权重确定,而权重又由权重函数确定。这与直觉一致——与更靠近单元格的数据点相比,距离单元格较远的点对单元格的新值的影响应该较小。在 Kohonen 映射中,权重函数强制执行此约束。教科书上的权重函数是高斯函数。在Python中:
在此函数中,dist是数据点到细胞中心的距离,t是时间(例如,地图构建过程中的每次迭代都是时钟的一个滴答声)。
想象一条高斯曲线,沿着其中心切成两半; x 轴表示距离,y 轴表示权重——因此,随着距离的增加,权重会减小。同样,随着 t 的增加,重量也会增加。这是构建 Kohonen 地图的关键要素:随着迭代次数的增加(地图构建过程中),相邻点对给定单元重新定位的影响越来越小。因此,时间-权重关系的重要性在于,单元位置的变化率随着时间的推移而减小(每次迭代位置变化较小),直到最终下一次迭代位置不再变化,这是收敛准则科霍宁地图。
数据点的权重与此有什么关系?那么,先前迭代中该晶格单元的位置是由该单元中的数据点和相邻单元中的数据点确定的,这些点对新单元位置的贡献是根据权重函数确定的。
最后,数据点的权重实际上并不是该数据点的固有属性。一方面,它仅在地图构建期间有用,另一方面,数据点实际上没有权重值 - 相反,在地图构建期间的每次迭代中,分配给给定单元格的数据点以及相邻单元格中的那些点是用于计算给定晶格单元的新位置。该计算通过为每个数据点分配权重来考虑每个点与细胞中心的距离 - 因此,该权重值仅对于该迭代和该细胞中心有意义,例如,在计算下一个细胞中心时,相同的数据点将具有不同的权重,因为它到单元中心的距离不同。
No. In an SOM (aka Kohonen Map) the weight function is applied to your data not the the "Neurons".
Weights are used during map construction (training), i.e., calculated at each iteration and for each lattice cell within each iteration. Put another way, for each iteration that comprises map construction, a weight function is used to scale the contribution of those points in determining the cell's position/location.
A data point's location in a Kohonen Map is determined by the lattice cell in the map closest to that data point--i.e., building a Kohonen Map involves iterative re-assignment of each point in your data set to the cell in the lattice closest to it.
Here's one way to think of it: A Kohonen Map is just a mapping of your data onto some fixed topology, or lattice, in 2 dimensions, a regular grid for instance.
Each iteration in the training phase (building the map) involves a re-assignment of each data point (if necessary) to the closest cell in the lattice closest to it. Next, the cell positions are adjusted based on (i) the data points assigned to that cell from the prior iteration; and (ii) the data points in the neighboring cells.
How the values of the data points in (i) and (ii) contribute to the new value of the cell location is determined by each data point's weight, which is in turn determined by a weight function. This is consistent with intuition--points further from the cell should have a smaller influence on the cell's new value compared with data points closer to the cell. In a Kohonen Map, the weight function enforces this constraint. The textbook weight function is Gaussian. In Python:
In this function, dist is the distance of the data point from the cell center, and t is time (e.g., each iteration during map building is one tick of the clock).
So imagine a Gaussian curve, cut in half down its center; the x axis is dist and the y axis represents weight--so as distance increases, the weight decreases. Likewise, as t increases, so does weight. This a crucial element in building Kohonen Map: with increasing iterations (during map building) the neighboring points have less and less influence on the re-positioning of a given cell. Therefore, the significance of the time-weight relationship is that the rate of change in cell positions decreases over time (positions change less with each iteration), until eventually the is no change in position with the next iteration which is the convergence criterion for a Kohonen Map.
What does the data point's weight have to do with this? Well, the location of that lattice cell in the prior iteration was determined by the data points in that cell and those in the neighboring cell, the contributions of those points to the new cell's position are determined according to a weighting function.
Finally, a data point's weight is not really an inherent attribute of that data point. For one thing, it's useful only during map construction, and for another a data points doesn't actually have a weight value--rather in each iteration during map construction, the data points assigned to a given cell and those points in neighboring cells are used to compute the new position of a given lattice cell. That computation takes into account the distance of each point from the cell center by assigning a weight to each data point--hence, that weight value is only meaningful for that iteration and for that cell center, e.g., in calculating the next cell center, the same data point will have a different weight because it's distance to that cell center is different.