def temp(features):
[featuresNorm, MAX, MIN] = normalizeFeatures(features)
[X, Y] = listOfFeatures2Matrix(featuresNorm)
rbm = BernoulliRBM(n_components = 10, n_iter = 1000, learning_rate = 0.01, verbose = False)
X1 = X[0::2]
X2 = X[1::2]
Y1 = Y[0::2]
Y2 = Y[1::2]
rbm.fit(X1,Y1)
YY = rbm.transform(X1)
for i in range(10):plt.plot(YY[i,:],'r')
for i in range(10):plt.plot(YY[i+10,:],'g')
for i in range(10):plt.plot(YY[i+20,:],'b')
plt.show()
评论列表
文章目录