This paper presents a novel method for feature selection by proposing an improved artificial immune recognition system (IAIRS) using the opposite sign test (OST). We use the nearest neighbor algorithm as the classifier. Forty-four data sets from the UCI and KEEL repository and from eight benchmark gene expression micro-array data sets were collected for evaluation purposes. This evaluation measures the effectiveness of the proposed approach. To investigate the capability of IAIRS, we compared our result with several features selection methods and classifier based methods. Moreover, we compared our results with the results obtained by several well-known algorithms from the previous literature. The performance measures were based on accuracy and the Cohen Kappa. A non-parametric statistical test was used to justify the performance of our proposed method. We confirmed that IAIRS is significantly better than other methods.