IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v13y2025i12p2009-d1681908.html
   My bibliography  Save this article

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

Author

Listed:
  • Yueyun Yu

    (Faculty of Applied Sciences, Macao Polytechnic University, Macao, China
    College of Big Data and Intelligent Engineering, Southwest Forestry University, Kunming 650224, China)

  • Xin Huang

    (College of Big Data and Intelligent Engineering, Southwest Forestry University, Kunming 650224, China)

  • Danjv Lv

    (College of Big Data and Intelligent Engineering, Southwest Forestry University, Kunming 650224, China)

  • Benjamin K. Ng

    (Faculty of Applied Sciences, Macao Polytechnic University, Macao, China)

  • Chan-Tong Lam

    (Faculty of Applied Sciences, Macao Polytechnic University, Macao, China)

Abstract

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% ( p < 0.01, Student’s t -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.

Suggested Citation

  • Yueyun Yu & Xin Huang & Danjv Lv & Benjamin K. Ng & Chan-Tong Lam, 2025. "A Novel Approach to Pine Nut Classification: Combining Near-Infrared Spectroscopy and Image Shape Features with Soft Voting-Based Ensemble Learning," Mathematics, MDPI, vol. 13(12), pages 1-21, June.
  • Handle: RePEc:gam:jmathe:v:13:y:2025:i:12:p:2009-:d:1681908
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/13/12/2009/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/13/12/2009/
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:13:y:2025:i:12:p:2009-:d:1681908. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.