classification problem is based on $m$ classes.

The task of any classification algorithm is to use the training dataset $\{(X_i,Y_i)\}_{i=1}^n$ to estimate $g(.)$, which is referred to as ‘training’ a classifier $\hat{g}(.)$. Given a new set of $\ell$ observations, $X' = \{X'_i\}_{i=1}^\ell$, called the test dataset [@ELS09], the classifier predicts the corresponding class $Y' = \{Y'_i\}_{i=1}^\ell$ using $\hat{Y_i'} = \hat{g}(X_i').$ Note that the test dataset $X'$ can also contain missing values. Many classification algorithms have been shown to perform better in terms of classification accuracy after imputing the missing values in the feature matrix $X$ [@farhangfar2008impact; @luengo2012choice] and then training the classifier. In this paper, we propose a nearest neighbor based imputation algorithm which is used to impute the missing values in X and then train the classifier $\hat{g}(.)$. The same algorithm can be extended to the test dataset and impute the missing values in $X'$.

In general, there are three different missing data mechanisms as defined in the statistical literature [@little2002]:

1.  Missing Completely at Random (MCAR): When the missingness of $X$ does not depend on the missing or observed values of $X$. In other words, using $D$ is as defined in , $$\label{4}
                P(D|X) = P(D), \quad \text{for 