The selective detection of ammonia (NH3), nitrogen dioxide (NO2), carbon oxides (CO2 and CO), acetone ((CH3)2CO), and toluene (C6H5CH3) is investigated by means of a gas sensor array based on polyaniline nanocomposites. The array composed by seven different conductive sensors with composite sensing layers are measured and analyzed using machine learning. Statistical tools, such as principal component analysis and linear discriminant analysis, are used as dimensionality reduction methods. Five different classification methods, namely k-nearest neighbors algorithm, support vector machine, random forest, decision tree classifier, and Gaussian process classification (GPC) are compared to evaluate the accuracy of target gas determination. We found the Gaussian process classification model trained on features extracted from the data by principal component analysis to be a highly accurate method reach to 99% of the classification of six different gases.