Objective. The aim of this study was to introduce a novel methodology for classification of brain hemodynamic responses collected via functional near infrared spectroscopy (fNIRS) during rest, motor imagery (MI) and motor execution (ME) tasks which involves generating population-level training sets. Approach. A 48-channel fNIRS system was utilized to obtain hemodynamic signals from the frontal (FC), primary motor (PMC) and somatosensory cortex (SMC) of ten subjects during an experimental paradigm consisting of MI and ME of various right hand movements. Classification accuracies of random forest (RF), support vector machines (SVM), and artificial neural networks (ANN) were computed at the single subject level by training each classifier with subject specific features, and at the group level by training with features from all subjects for ME versus Rest, MI versus Rest and MI versus ME conditions. The performances were also computed for channel data restricted to FC, PMC and SMC regions separately to determine optimal probe location. Main results. RF, SVM and ANN had comparably high classification accuracies for ME versus Rest (%94, %96 and %98 respectively) and for MI versus Rest (%95, %95 and %98 respectively) when fed with group level feature sets. The accuracy performance of each algorithm in localized brain regions were comparable (>%93) to the accuracy performance obtained with whole brain channels (>%94) for both ME versus Rest and MI versus Rest conditions. Significance. By demonstrating the feasibility of generating a population level training set with a high classification performance for three different classification algorithms, the findings pave the path for removing the necessity to acquire subject specific training data and hold promise for a novel, real-time fNIRS based BCI system design which will be most effective for application to disease populations for whom obtaining data to train a classification algorithm is not possible.