.getDimension();
DoubleMatrix mat = null;
if (features[0].isSparse()) {
mat = new SparseDoubleRowMatrix(features);
} else {
mat = new DenseDoubleMatrix(features);
}
ConditionalLikelihoodCostFunction func = new ConditionalLikelihoodCostFunction(
mat, new DenseDoubleMatrix(outcome));
DenseDoubleVector vx = new DenseDoubleVector(mat.getColumnCount() * classes);
DoubleVector input = minimizer.minimize(func, vx, numIterations, verbose);
theta = DenseMatrixFolder.unfoldMatrix(input, classes,
(int) (input.getLength() / (double) classes));
}