def trainRBM_LR(features, paramC, nComponents):
[X, Y] = listOfFeatures2Matrix(features)
logistic = LogisticRegression(C = paramC)
rbm = BernoulliRBM(n_components = nComponents, n_iter = 100, learning_rate = 0.01, verbose = False)
# NORMALIZATION???
classifier = Pipeline([("rbm", rbm), ("logistic", logistic)])
classifier.fit(X, Y)
return classifier
评论列表
文章目录