Exercise:Self-Taught Learning
From Ufldl
Line 25: | Line 25: | ||
===Step Three: Training the logistic regression model=== | ===Step Three: Training the logistic regression model=== | ||
- | After the sparse autoencoder is trained, we can use it to detect pen strokes in images. To do so, you will need to | + | After the sparse autoencoder is trained, we can use it to detect pen strokes in images. To do so, you will need to be able to save the sparse autoencoder function to output its hidden unit activation. |
- | + | Fill in <tt>feedForwardSparseAutoencoder.m</tt> to produce a matrix whose columns correspond to activation of the hidden layer for each example i.e. the vector <math>a^{(2)}</math> corresponding to activation of layer <math>L_{2}</math>. | |
- | <tt> | + | |
- | After doing so, this step will use your modified function to convert the raw image data to feature unit activations. It will then train the softmax regression model on the hidden unit activation and labels. | + | After doing so, this step will use your modified function to convert the raw image data to feature unit activations. It will then train the softmax regression model on the hidden unit activation and labels with <tt>trainSoftmax.m</tt>. |
===Step Four: Training and testing the logistic regression model=== | ===Step Four: Training and testing the logistic regression model=== |