python中来自matlab的竞争网络类型

时间:2019-06-07 20:41:54

标签: python matlab neural-network classification

我想用python创建一个网络,其效果与matlab中的竞争网络类型类似。

  • 如何从nntool中定义竞争力的说明截屏。 enter image description here
  • link到Matlab示例

python框架中是否有替代方法?

1 个答案:

答案 0 :(得分:0)

竞争性网络类型之一可以用于SOM(自组织地图-Kohonem地图)。

我使用了this neupy实现


以下是示例从链接网站复制的内容:

import numpy as np
from neupy import algorithms, utils

utils.reproducible()

data = np.array([
    [0.1961, 0.9806],
    [-0.1961, 0.9806],
    [-0.5812, -0.8137],
    [-0.8137, -0.5812],
])

sofm = algorithms.SOFM(
    n_inputs=2,
    n_outputs=2,
    step=0.1,
    learning_radius=0
)
sofm.train(data, epochs=100)
sofm.predict(data)