Internet of Things’ (IoT) deployments are increasingly dependent upon learning algorithms to analyse collected data, draw conclusions, and take decisions. The norm is to deploy such learning algorithms on the cloud and have IoT nodes interact with the cloud. While this is effective, it is rather wasteful in terms of energy expended and temporal latency. In this article, the endeavour is to develop a technique that facilitates classification, an important learning algorithm, within the extremely resource constrained environments of IoT nodes. The approach comprises selecting a small number of representative data points, called prototypes, from a large dataset and deploying these prototypes over IoT nodes. The prototypes are selected in a manner that they appropriately represent the complete dataset and are able to correctly classify new, incoming data. The novelty lies in the manner of prototype selection for a cluster that not only considers the location of datapoints of its own cluster but also that of datapoints in neighboring clusters. The efficacy of the approach is validated using standard datasets and compared with state-of-the-art classification techniques used in constrained environments. A real world deployment of the technique is done over an Arduino Uno-based IoT node and shown to be effective.