A penalized likelihood method for classification with matrix-valued predictors