Hybrid Machine Learning Approach for Nutrient Deficiency Detection in Lettuce - Zuriati, Zuriati; Widyawati, Dewi Kania; Arifin, Oki; Saputra, Kurniawan; Sriyanto, Sriyanto; Ahmad, Asmala (TIERS Information Technology Journal, 2025)
Early detection of nutrient deficiencies in lettuce is essential for precision agriculture. However, this task remains challenging due to limited data availability and class imbalance, which reduce model sensitivity toward minority classes and hinder generalization. This study introduces a hybrid machine learning approach integrating SMOTE, Optuna, and SVM to enhance the accuracy of nutrient deficiency classification using digital leaf image analysis. The dataset, obtained from Kaggle, includes four categories: Nitrogen Deficiency (-N), Phosphorus Deficiency (-P), Potassium Deficiency (-K), and Fully Nutritional (FN). Image features were extracted using MobileNetV2 pretrained on ImageNet and classified with a Support Vector Machine. Three scenarios were tested: (1) SVM before SMOTE, (2) SVM after SMOTE, and (3) Optuna-SVM after SMOTE, evaluated using accuracy, precision, recall, and f1-score. The hybrid model achieved the best performance with accuracy 0.929, precision 0.946, recall 0.835, and f1-score 0.869, outperforming the other scenarios. This hybrid framework effectively addressed class imbalance and improved classification margin stability through adaptive hyperparameter tuning using the Tree Structured Parzen Estimator within Optuna. The novelty of this study lies in combining MobileNetV2 based feature extraction with SMOTE and Optuna-SVM for small agricultural datasets. The proposed approach offers an efficient, accurate, and practical solution for automated nutrient deficiency diagnosis and contributes to the development of AI-driven smart agriculture systems.