Poultry egg productivity is strongly influenced by various environmental factors, such as air and water quality. However, accurately predicting productivity remains a challenge due to the complex interplay of multiple environmental variables and the risk of overfitting in predictive models. This study improves egg productivity prediction using Logistic Regression with L1 regularization, which enhances model generalization by performing automatic feature selection. The research methodology includes data collection of key environmental indicators—Air Quality Index (AQI), Water Quality Index (WQI), and Humidex—followed by data preprocessing, exploratory data analysis (EDA), and model training using L1-regularized Logistic Regression. Model evaluation was performed using classification metrics and learning curve analysis to assess stability and effectiveness. Experimental results indicate that Logistic Regression without regularization achieved an accuracy of 90.7%, with misclassification occurring in the lower production categories. By applying L1 regularization, accuracy increased significantly to 97%, demonstrating its ability to reduce overfitting while improving classification performance. This study also compares its findings with previous research, such as De Col et al. (wheat epidemic prediction, 80–85% accuracy) and Jia Q1 et al. (heart disease prediction, 92.39% accuracy), confirming that our approach outperforms prior Logistic Regression models in similar predictive tasks. These findings suggest that L1 regularization is an effective solution for improving egg productivity prediction, particularly in scenarios with complex environmental influences. Future work will explore advanced ensemble learning techniques and real-time IoT-based monitoring to further enhance prediction accuracy and practical applicability.