* @return The SVM problem.
*/
public static svm_problem encode(final MLDataSet training,
final int outputIndex) {
try {
final svm_problem result = new svm_problem();
result.l = (int) training.getRecordCount();
result.y = new double[result.l];
result.x = new svm_node[result.l][training.getInputSize()];