Sparse representation-based classifier (SRC) and kernel sparse representation-based classifier (KSRC) are founded on combining pattern recognition and compressive sensing methods and provide acceptable results in many machine learning problems. Nevertheless, these classifiers suffer from some shortcomings. For instance, SRC's accuracy drops against samples from same directional classes or KSRC's output declines when data is not normally distributed in kernel space. This paper introduces nonparametric kernel sparse representation-based classifier (NKSRC) as a generalized framework for SRC and KSRC. First, it applies kernel on samples to overcome data directionality and then employs nonparametric discriminant analysis (NDA) to reduce data dimensionality in kernel space alleviating concern about data distribution type. The experimental results of NKSRC demonstrate its superiority over SRC and KSRC-LDA and its equal or superior performance with respect to KSRC-PCA on some synthetic, four well-known face recognition and several UCI datasets. (C) 2017 Published by Elsevier B.V.