Classification is an important task at which both biological and artificial neural networks excel1,2. In machine learning, nonlinear projection into a high-dimensional feature space can make data linearly separable3,4, simplifying the classification of complex features. Such nonlinear projections are computationally expensive in conventional computers. A promising approach is to exploit physical materials systems that perform this nonlinear projection intrinsically, because of their high computational density5, inherent parallelism and energy efficiency6,7. However, existing approaches either rely on the systems’ time dynamics, which requires sequential data processing and therefore hinders parallel computation5,6,8, or employ large materials systems that are difficult to scale up7. Here we use a parallel, nanoscale approach inspired by filters in the brain1 and artificial neural networks2 to perform nonlinear classification and feature extraction. We exploit the nonlinearity of hopping conduction9–11 through an electrically tunable network of boron dopant atoms in silicon, reconfiguring the network through artificial evolution to realize different computational functions. We first solve the canonical two-input binary classification problem, realizing all Boolean logic gates12 up to room temperature, demonstrating nonlinear classification with the nanomaterial system. We then evolve our dopant network to realize feature filters2 that can perform four-input binary classification on the Modified National Institute of Standards and Technology handwritten digit database. Implementation of our material-based filters substantially improves the classification accuracy over that of a linear classifier directly applied to the original data13. Our results establish a paradigm of silicon-based electronics for small-footprint and energy-efficient computation14.