January 2018
Beginner to intermediate
316 pages
7h 14m
English
Even the optimal number of PCA components was unable to beat the logistic regression alone by much in terms of accuracy. Let's see how our RBM does. To make the following pipeline, we will keep the same parameters for the logistic regression model and find the optimal number of components between 10, 100, and 200 (like we did for the PCA pipeline). Note that we could try to expand the number of features past the number of raw pixels (784) but we will not attempt to.
We begin the same way by setting up our variables:
# Use the RBM to learn new features rbm = BernoulliRBM(random_state=0) # set up the params for our pipeline.params = {'clf__C':[1e-1, 1e0, 1e1],'rbm__n_components': [10, 100, 200] ...Read now
Unlock full access