def main(): obs = srk.Observation( np.loadtxt("data.txt") ) data_category = np.loadtxt( "category.txt" ) vae1 = vae_model( 18, epoch=200, batch_size=500 ) gmm1 = gmm.GMM( 10, category=data_category ) mm1 = mm.MarkovModel() vae1.connect( obs ) gmm1.connect( vae1 ) mm1.connect( gmm1 ) for i in range(5): print( i ) vae1.update() gmm1.update() mm1.update()
def main(): obs = srk.Observation(np.loadtxt("data.txt")) correct_classes = np.loadtxt("correct.txt") # GMM単体 g = gmm.GMM(4, category=correct_classes) g.connect(obs) g.update() # GMMとマルコフモデルを結合したモデル g = gmm.GMM(4, category=correct_classes) m = mm.MarkovModel() g.connect(obs) m.connect(g) for itr in range(5): g.update() m.update()
def main(): obs1 = srk.Observation(np.loadtxt("data1.txt")) obs2 = srk.Observation(np.loadtxt("data2.txt")) data_category = np.loadtxt("category.txt") vae1 = vae_model(18, epoch=200, batch_size=500) gmm1 = gmm.GMM(10, category=data_category) mlda1 = mlda.MLDA(10, [200, 200], category=data_category) mm1 = mm.MarkovModel() vae1.connect(obs1) gmm1.connect(vae1) mlda1.connect(obs2, gmm1) mm1.connect(mlda1) for i in range(5): print(i) vae1.update() gmm1.update() mlda1.update() mm1.update()