Python中的六角形自组织图

编程入门 行业动态 更新时间:2024-10-24 00:19:28
本文介绍了Python中的六角形自组织图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在寻找六角形 自组织地图在Python上.

I am looking for hexagonal self-organizing map on Python.

  • 就绪模块.如果存在的话.
  • 绘制六角形细胞的方式
  • 与六角形单元格作为数组或其他元素一起使用的算法
  • 关于: 自组织图(SOM)或自组织特征图(SOFM)是一种人工神经网络,使用无监督学习对其进行训练,以生成低维(通常为二维)

    About: A self-organizing map (SOM) or self-organizing feature map (SOFM) is a type of artificial neural network that is trained using unsupervised learning to produce a low-dimensional (typically two-dimensional)

    推荐答案

    我没有关于第1点的答案,但是有关于第2点和第3点的一些提示.但是一个具有6个邻居的图块的概念空间.可以用排列成列的正方形瓷砖进行建模,其中奇数列垂直移动一个正方形大小的一半.我将尝试一个ASCII图:

    I don't have an answer for point 1, but some hints for point 2 and 3. In your context, you're not modelling a physical 2D space but a conceptual space with tiles that have 6 neighbors. This can be modelled with square tiles arranged in columns with the odd colums shifted vertically by half the size of a square. I'll try an ASCII diagram:

    ___ ___ ___ | |___| |___| |___ |___| |___| |___| | | |___| |___| |___| |___| |___| |___| | | |___| |___| |___| |___| |___| |___| | |___| |___| |___|

    您可以轻松地看到每个正方形都有6个邻居(当然,边缘上的邻居除外).可以很容易地将其建模为2D正方形数组,并且计算位置(i,j)处正方形的坐标的规则非常简单:

    You can see easily that each square has 6 neighbors (except the ones on the edges of course). This gets easily modeled as a 2D array of squares, and the rules to compute the coordinates of the square at at position (i, j), i being the row and j the column are quite simple:

    如果j是偶数:

    (i+1, j), (i-1, j), (i, j-1), (i, j+1), (i-1, j-1), (i+1, j-1)

    如果j为奇数:

    (i+1, j), (i-1, j), (i, j-1), (i, j+1), (i+1, j-1), (i+1, j+1)

    (前四个词是相同的)

    更多推荐

    Python中的六角形自组织图

    本文发布于:2023-11-30 02:44:11,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1648451.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:组织   Python

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!