The objective of the present contribution is to use a portable near infrared (NIR) spectrometer (in spectral range of 900-1700 nm) as a rapid, facile, and nondestructive technique in combination with ensemble methods, for detection of water in bovine milk samples in concentration range 1% to 30% (v/v).On this matter, the pattern of the milk samples (pure and adulterated) was explored by principal component analysis (PCA). Then, random subspace discriminant ensemble (RSDE) was used for classification. The classification figures of merit for the RSDE method was evaluated in terms of sensitivity (Sen), specificity (Spe), accuracy (Acc), error rate (ER), and reliability (Rel). All the values were satisfactory for calibration, cross-validation, and prediction sets, which showed the reliability and robustness of the developed model. Furthermore, the performance of RSDE method was compared with partial least square-discriminant analysis (PLS-DA) and support vector machine (SVM) as the most common classification techniques. In overall, the RSDE classification outperformed the other tested classification methods (PLS-DA and RBF-SVM) in terms of accuracy and reliability. Finally, boosted regression tree (BRT) was used for quantifying the level of water adulterant in milk. The performance of the ensemble regression model was evaluated using regression coefficient (R 2 ) and root mean square error (RMSE). The values of R 2 and RMSE in prediction set for BRT were 0.95 and 0.58, respectively. The performance of BRT method was also compared with partial least squares regression (PLSR) which again showed outperformance in comparison with this frequent used regression technique.