1. A method of spectrum data analysis, the method comprising acquiring a spectrum of an unknown mineral sample by generating x-rays from the unknown mineral sample and detecting the x-rays with a x-ray detector; decomposing the spectrum of the unknown mineral sample to yield a compositional value; determining a similarity metric between the unknown mineral sample and a mineral definition, the mineral definition providing a range for at least one element in th definition and a variation measure and including a variable mineral composition defined by a subspace with end members, the similarity metric being determined using a sample variation determined by a variation in the mineral definition and the number of x-ray counts in the unknown spectrum; and if the computed value is within a user-defined threshold distance to an extrapolation of the subspace, extending the subspace to include a computed value outside bounds of the subspace.