The above description is summarized in the following pseudo-code.

Algorithm: Deep autoencoder for lung nodule classification
Input: Cropped images of candidate lung nodules as feature vector X and ground truth (labelled data)
Output: Binary classification of candidate lung nodules as nodule/non-nodule
Steps:
Note: The proposed model comprises stacked autoencoders.
1. Compute the activation for every neuron in first autoencoder computed with appropriate weights (2.)
2. Compute cost function for the first autoencoder computed using (6).
3. Minimize cost function using backpropagation. (training of first autoencoder).
4. Extract the hidden layer after training the first autoencoder, and feed to second autoencoder
5. Repeat steps 1,2,3 for the second autoencoder to form a stacked autoencoder (training of entire stacked autoencoder)
6. Feed the hidden layer of second autoencoder and the ground truth data to the softmax layer for classification (nodule/non-nodule)