ported apply_multiclass and train_machine to eigen3