{"title":"MetaCountRegressor: A package for extensive analysis and estimation of advanced count data models","authors":"Zeke Ahern , Paul Corry , Alexander Paz","doi":"10.1016/j.trip.2026.101969","DOIUrl":null,"url":null,"abstract":"<div><div>Analyzing and modeling rare events in count data presents significant challenges due to the scarcity of observations and the complexity of underlying processes, which often can be overlooked by analysts due to limitations in time, resources, knowledge, and experience. This paper provides details and instructions to use MetaCountRegressor, a Python package designed to facilitate predictive count modeling of rare events using advanced optimization algorithms. MetaCountRegressor offers a wide range of capabilities specifically tailored for the unique characteristics of rare event analysis and prediction. Metaheuristic algorithms efficiently generate and evaluate model specifications, thereby facilitating extensive hypothesis testing, the discovery of insights, and parameter tuning without overfitting. These algorithms are specifically engineered to deal with the inherent challenges of modeling rare events for predictive purposes, and capturing causative effects that are easily interpretable. State-of-the-art models are produced by coupling analysts knowledge and preferences with decision-based optimization framework. This includes the ability to capture unobserved heterogeneity through random parameters as well as correlated and grouped random parameters. It also supports a range of distributions for the random parameters, and can capture heterogeneity in the means. The package also supports panel data, among other features, and serves as a systematic framework for analysts to discover optimization-driven results, saving time, reducing biases, and minimizing the need for extensive prior knowledge. The experimental results highlight the effectiveness of MetaCountRegressor in optimizing complex count models using synthetic and real crash data, supported by illustrative examples on fitting models in order to discover the functional form respective of the problem instance. The framework achieves significant reductions in the Bayesian Information Criterion (BIC) and Root Mean Squared Prediction Error (RMSE) compared to analysts proposed models, all while maintaining computational efficiency across diverse test cases. By eliminating the need for manual iterative processes, these findings demonstrate the vast solution space and underscore the importance of enhanced tools for model selection. Results and resources are provided to illustrate the capabilities and advantages of using the proposed modeling framework implemented in MetaCountRegressor.</div></div>","PeriodicalId":36621,"journal":{"name":"Transportation Research Interdisciplinary Perspectives","volume":"37 ","pages":"Article 101969"},"PeriodicalIF":4.8000,"publicationDate":"2026-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Transportation Research Interdisciplinary Perspectives","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S259019822600134X","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/4/30 0:00:00","PubModel":"Epub","JCR":"Q2","JCRName":"TRANSPORTATION","Score":null,"Total":0}
引用次数: 0
Abstract
Analyzing and modeling rare events in count data presents significant challenges due to the scarcity of observations and the complexity of underlying processes, which often can be overlooked by analysts due to limitations in time, resources, knowledge, and experience. This paper provides details and instructions to use MetaCountRegressor, a Python package designed to facilitate predictive count modeling of rare events using advanced optimization algorithms. MetaCountRegressor offers a wide range of capabilities specifically tailored for the unique characteristics of rare event analysis and prediction. Metaheuristic algorithms efficiently generate and evaluate model specifications, thereby facilitating extensive hypothesis testing, the discovery of insights, and parameter tuning without overfitting. These algorithms are specifically engineered to deal with the inherent challenges of modeling rare events for predictive purposes, and capturing causative effects that are easily interpretable. State-of-the-art models are produced by coupling analysts knowledge and preferences with decision-based optimization framework. This includes the ability to capture unobserved heterogeneity through random parameters as well as correlated and grouped random parameters. It also supports a range of distributions for the random parameters, and can capture heterogeneity in the means. The package also supports panel data, among other features, and serves as a systematic framework for analysts to discover optimization-driven results, saving time, reducing biases, and minimizing the need for extensive prior knowledge. The experimental results highlight the effectiveness of MetaCountRegressor in optimizing complex count models using synthetic and real crash data, supported by illustrative examples on fitting models in order to discover the functional form respective of the problem instance. The framework achieves significant reductions in the Bayesian Information Criterion (BIC) and Root Mean Squared Prediction Error (RMSE) compared to analysts proposed models, all while maintaining computational efficiency across diverse test cases. By eliminating the need for manual iterative processes, these findings demonstrate the vast solution space and underscore the importance of enhanced tools for model selection. Results and resources are provided to illustrate the capabilities and advantages of using the proposed modeling framework implemented in MetaCountRegressor.