Rapid Analysis of Fresh Cow Milk Chemical Composition by Using Portable NIR Spectrometer Coupled with Machine Learning

Authors

  • Aminatur Ridho Department of Animal Production and Technology, Faculty of Animal Science, IPB University
  • Epi Taufik Department of Animal Production and Technology, Faculty of Animal Science, IPB University
  • Cahyo Budiman Department of Animal Production and Technology, Faculty of Animal Science, IPB University
  • Diang Sagita Research Center for Equipment Manufacturing Technology, National Research and Innovation Agency
  • Slamet Widodo Division of Biosystem Engineering, Faculty of Engineering and Technology, IPB University

DOI:

https://doi.org/10.19028/jtep.014.1.144-161

Keywords:

chemometrics, machine learning, milk composition, portable NIRS, rapid analysis

Abstract

Analysis of milk composition is essential for quality assurance and compliance with regulations related to quality standards, yet current tools lack of rapid analysis capability especially for field application. This study investigated the potential use of portable near-infrared spectroscopy (NIRS) combined with chemometrics and machine learning to predict fat, protein and lactose content of fresh cow milk. Spectral data were collected from fresh cow milk samples using a portable device working in the short-wave NIR (740–1070 nm). Samples were obtained from five farms at two locations in the Bogor area during morning and evening milking times. As a reference to develop the predictive model, the fat, protein, and lactose contents were measured using Milkotester Master Eco, which is a standard widely accepted by farmers and the milk industry. Two predictive methods were applied: Partial Least Squares Regression (PLS-R) and machine learning algorithms (i.e. Artificial Neural Network (ANN) and Random Forest (RF)) with various data pre-treatments. The best PLS-R models achieved determination coefficient of prediction (R²p) values of 0.828 (fat), 0.397 (protein), and 0.384 (lactose). Machine learning models further improved R²p to 0.901, 0.562, and 0.444, respectively. These findings demonstrate that portable NIRS combined with machine learning enables fast and reliable milk composition analysis, particularly for fat content. However, the prediction performance for protein and lactose is still limited and needs to be further improved.

Downloads

Download data is not yet available.

Author Biographies

  • Aminatur Ridho, Department of Animal Production and Technology, Faculty of Animal Science, IPB University

    .

  • Epi Taufik, Department of Animal Production and Technology, Faculty of Animal Science, IPB University

    .

  • Cahyo Budiman, Department of Animal Production and Technology, Faculty of Animal Science, IPB University

    .

  • Diang Sagita, Research Center for Equipment Manufacturing Technology, National Research and Innovation Agency

    .

  • Slamet Widodo, Division of Biosystem Engineering, Faculty of Engineering and Technology, IPB University

    .

.

Downloads

Published

2026-04-16

How to Cite

Ridho, A., Taufik, E., Budiman, C., Sagita, D., & Widodo, S. (2026). Rapid Analysis of Fresh Cow Milk Chemical Composition by Using Portable NIR Spectrometer Coupled with Machine Learning. Jurnal Keteknikan Pertanian, 14(1), 144-161. https://doi.org/10.19028/jtep.014.1.144-161

Most read articles by the same author(s)

1 2 > >>