private static Prediction[] testLinearModel(LibLINEARModel model, Feature[][] problem) {
Prediction[] pred = new Prediction[problem.length];
for (int i = 0; i < problem.length; i++) {
double[] decVal = new double[(model.getModel().getNrClass() <= 2) ? 1 : model.getModel().getNrClass()];
pred[i] = new Prediction(Linear.predictValues(model.getModel(), problem[i], decVal), i);
pred[i].setDecisionValue(decVal);
}
return pred;
}