Naïve Bayesian model optimized for sparse datasets