Abstract
Multi-class wine classification presents fundamental trade-offs between model accuracy, feature dimensionality, and interpretability - critical factors for production deployment in analytical chemistry. This paper presents a comprehensive empirical study of One-vs-Rest logistic regression on the UCI Wine dataset (178 samples, 3 cultivars, 13 chemical features), comparing from-scratch gradient descent implementation against scikit-learn's optimized solvers and quantifying L1 regularization effects on feature sparsity. Manual gradient descent achieves 92.59 percent mean test accuracy with smooth convergence, validating theoretical foundations, though scikit-learn provides 24x training speedup and 98.15 percent accuracy. Class-specific analysis reveals distinct chemical signatures with heterogeneous patterns where color intensity varies dramatically (0.31 to 16.50) across cultivars. L1 regularization produces 54-69 percent feature reduction with only 4.63 percent accuracy decrease, demonstrating favorable interpretability-performance trade-offs. We propose an optimal 5-feature subset achieving 62 percent complexity reduction with estimated 92-94 percent accuracy, enabling cost-effective deployment with 80 dollars savings per sample and 56 percent time reduction. Statistical validation confirms robust generalization with sub-2ms prediction latency suitable for real-time quality control. Our findings provide actionable guidelines for practitioners balancing comprehensive chemical analysis against targeted feature measurement in resource-constrained environments.
Abstract (translated)
多类葡萄酒分类在模型准确性、特征维度和可解释性之间存在基本的权衡,这些因素对于分析化学中的生产部署至关重要。本文对UCI葡萄酒数据集(178个样本,3种葡萄品种,13个化学特征)上的一对多逻辑回归进行了一项全面的经验研究,比较了从头开始实现的梯度下降和scikit-learn优化求解器,并量化了L1正则化对特征稀疏性的影响。手动梯度下降实现了平均测试准确率为92.59%,并且具有平滑收敛的特点,验证了理论基础的有效性;然而,scikit-learn提供了比前者快24倍的训练速度和高达98.15%的准确性。针对不同类别的分析揭示了不同的化学特征模式,在这些模式中,颜色强度在品种间差异显著(0.31至16.50)。L1正则化能够减少约54-69%的特征数量,并且仅导致4.63%的准确率下降,这表明了较好的可解释性和性能之间的权衡。我们提出了一种理想的5个特征子集方案,它在保持估计为92-94%准确性的同时实现了复杂度减少62%,从而能够以低成本部署(每样本节省80美元)和时间减少56%的方式进行实施。统计验证确认了其具有鲁棒的泛化能力,并且预测延迟小于2毫秒,这使其适用于实时质量控制。我们的研究为在资源受限环境中平衡全面化学分析与目标特征测量提供了实用指导。
URL
https://arxiv.org/abs/2510.14449