A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning

Pine nuts hold significant economic value due to their rich plant protein and healthy fats, yet precise variety classification has long been hindered by limitations of traditional techniques such as chemical analysis and machine vision. This study proposes a novel near-infrared (NIR) spectral featur...

Full description

Saved in:
Bibliographic Details
Main Authors: Yueyun Yu, Xin Huang, Danjv Lv, Benjamin K. Ng, Chan-Tong Lam
Format: Article
Language:English
Published: MDPI AG 2025-06-01
Series:Mathematics
Subjects:
Online Access:https://www.mdpi.com/2227-7390/13/12/2009
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849432876894912512
author Yueyun Yu
Xin Huang
Danjv Lv
Benjamin K. Ng
Chan-Tong Lam
author_facet Yueyun Yu
Xin Huang
Danjv Lv
Benjamin K. Ng
Chan-Tong Lam
author_sort Yueyun Yu
collection DOAJ
description Pine nuts hold significant economic value due to their rich plant protein and healthy fats, yet precise variety classification has long been hindered by limitations of traditional techniques such as chemical analysis and machine vision. This study proposes a novel near-infrared (NIR) spectral feature selection algorithm, termed the improved binary equilibrium optimizer with selection probability (IBiEO-SP), which incorporates a dynamic probability adjustment mechanism to achieve efficient feature dimensionality reduction. Experimental validation on a dataset comprising seven pine nut varieties demonstrated that, compared to particle swarm optimization (PSO) and the genetic algorithm (GA), the IBiEO-SP algorithm improved average classification accuracy by 5.7% (<i>p</i> < 0.01, Student’s <i>t</i>-test) under four spectral preprocessing methods (MSC, SNV, SG1, and SG2). Remarkably, only 2–3 features were required to achieve optimal performance (MSC + random forest: 99.05% accuracy, 100% F1/precision; SNV + KNN: 97.14% accuracy, 100% F1/precision). Furthermore, a multimodal data synergy strategy integrating NIR spectroscopy with morphological features was proposed, and a classification model was constructed using a soft voting ensemble. The final classification accuracy reached 99.95%, representing a 2.9% improvement over single-spectral-mode analysis. The results indicate that the IBiEO-SP algorithm effectively balances feature discriminative power and model generalization needs, overcoming the contradiction between high-dimensional data redundancy and low-dimensional information loss. This work provides a high-precision, low-complexity solution for rapid quality detection of pine nuts, with broad implications for agricultural product inspection and food safety.
format Article
id doaj-art-9cff9c8136ca4151bc523636c43e3a5c
institution Kabale University
issn 2227-7390
language English
publishDate 2025-06-01
publisher MDPI AG
record_format Article
series Mathematics
spelling doaj-art-9cff9c8136ca4151bc523636c43e3a5c2025-08-20T03:27:14ZengMDPI AGMathematics2227-73902025-06-011312200910.3390/math13122009A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble LearningYueyun Yu0Xin Huang1Danjv Lv2Benjamin K. Ng3Chan-Tong Lam4Faculty of Applied Sciences, Macao Polytechnic University, Macao, ChinaCollege of Big Data and Intelligent Engineering, Southwest Forestry University, Kunming 650224, ChinaCollege of Big Data and Intelligent Engineering, Southwest Forestry University, Kunming 650224, ChinaFaculty of Applied Sciences, Macao Polytechnic University, Macao, ChinaFaculty of Applied Sciences, Macao Polytechnic University, Macao, ChinaPine nuts hold significant economic value due to their rich plant protein and healthy fats, yet precise variety classification has long been hindered by limitations of traditional techniques such as chemical analysis and machine vision. This study proposes a novel near-infrared (NIR) spectral feature selection algorithm, termed the improved binary equilibrium optimizer with selection probability (IBiEO-SP), which incorporates a dynamic probability adjustment mechanism to achieve efficient feature dimensionality reduction. Experimental validation on a dataset comprising seven pine nut varieties demonstrated that, compared to particle swarm optimization (PSO) and the genetic algorithm (GA), the IBiEO-SP algorithm improved average classification accuracy by 5.7% (<i>p</i> < 0.01, Student’s <i>t</i>-test) under four spectral preprocessing methods (MSC, SNV, SG1, and SG2). Remarkably, only 2–3 features were required to achieve optimal performance (MSC + random forest: 99.05% accuracy, 100% F1/precision; SNV + KNN: 97.14% accuracy, 100% F1/precision). Furthermore, a multimodal data synergy strategy integrating NIR spectroscopy with morphological features was proposed, and a classification model was constructed using a soft voting ensemble. The final classification accuracy reached 99.95%, representing a 2.9% improvement over single-spectral-mode analysis. The results indicate that the IBiEO-SP algorithm effectively balances feature discriminative power and model generalization needs, overcoming the contradiction between high-dimensional data redundancy and low-dimensional information loss. This work provides a high-precision, low-complexity solution for rapid quality detection of pine nuts, with broad implications for agricultural product inspection and food safety.https://www.mdpi.com/2227-7390/13/12/2009IBiEO-SPpine nutnear-infrared spectroscopyfeature selectionensemble learning
spellingShingle Yueyun Yu
Xin Huang
Danjv Lv
Benjamin K. Ng
Chan-Tong Lam
A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning
Mathematics
IBiEO-SP
pine nut
near-infrared spectroscopy
feature selection
ensemble learning
title A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning
title_full A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning
title_fullStr A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning
title_full_unstemmed A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning
title_short A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning
title_sort novel approach to pine nut classification combining near infrared spectroscopy and image shape features with soft voting based ensemble learning
topic IBiEO-SP
pine nut
near-infrared spectroscopy
feature selection
ensemble learning
url https://www.mdpi.com/2227-7390/13/12/2009
work_keys_str_mv AT yueyunyu anovelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT xinhuang anovelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT danjvlv anovelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT benjaminkng anovelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT chantonglam anovelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT yueyunyu novelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT xinhuang novelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT danjvlv novelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT benjaminkng novelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning
AT chantonglam novelapproachtopinenutclassificationcombiningnearinfraredspectroscopyandimageshapefeatureswithsoftvotingbasedensemblelearning