Classification using linear models with uncertain weights