Porosity and alteration play an important role in the mechanical behavior of volcanic rocks. The measurement of these properties is done several ways. We analyze four cases of quantifying the relationship of porosity and alteration data for Icelandic rocks using thin section porosity, measured porosity, microporosity, and total alteration. We use the k nearest neighbors supervised learning approach to test a portion of the data and compare the lithology class prediction to the observed class, and evaluate the sensitivity of k for each case. We determine the best accuracy measurements for each lithology. Thin section porosity is best to use for intrusions while measured porosity is best for hyaloclastites, when comparing to alteration. Lava flows are ambiguous and need more evaluation of the observed data. This study is part of a larger project to use these methods and results for probabilistic reservoir modeling, where a prior distribution is necessary.