To objectively classify eyes as either healthy or glaucoma based exclusively on data provided by peripapillary retinal nerve fiber layer (pRNFL) and ganglion cell-inner plexiform (GCIPL) measurements derived from spectral-domain optical coherence tomography (SD-OCT) using machine learning algorithms. Three clustering methods (k-means, hierarchical cluster analysis -HCA- and model-based clustering-MBC-) were used separately to classify a training sample of 109 eyes as either healthy or glaucomatous using solely 13 SD-OCT parameters: pRNFL average and sector thicknesses and GCIPL average and minimum values together with the six macular wedge-shaped regions. Then, the best-performing algorithm was applied to an independent test sample of 102 eyes to derive close estimates of its actual performance (external validation). In the training sample, accuracy was 91.7% for MBC, 81.7% for k-means and 78.9% for HCA (p value = 0.02). The best MBC model was that in which subgroups were allowed to have variable volume and shape and equal orientation. The MBC algorithm in the independent test sample correctly classified 98 out of 102 cases for an overall accuracy of 96.1% (95% CI, 92.3-99.8%), with a sensitivity of 94.3 and 100% specificity. The accuracy for pRNFL was 92.2% (95% CI, 86.9-97.4%) and for GCIPL 98.0% (95% CI, 95.3-100%). Clustering algorithms in general (and MBC in particular) seem promising methods to help discriminate between healthy and glaucomatous eyes using exclusively SD-OCT-derived parameters. Understanding the relative merits of one method over others may also provide insights into the nature of the disease.