Build a bayesian Self-Organizing Map. Example I
Code: "neural_net_bsom1.py". Programming language: Python DMelt Version 1. Last modified: 10/29/2015. License: Pro
https://datamelt.org/code/cache/neural_net_bsom1_8244.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



from java.util import Random
from jhplot  import *

h1 = H1D("Data",20, -100.0, 300.0)
r = Random()
for i in range(2000):
      h1.fill(100+r.nextGaussian()*100) 
      h1.fill(100+r.nextDouble()*100) 
      
          
p1d=P1D(h1,0,0)
# write to a file
p1d.toFile("data.txt")

bs=HBsom()
bs.setNPoints(30)
bs.setData(p1d)
bs.visible()

Ads help maintain this website.