after building a classifier using "x.buildClassifier(trainingInstances);" I
create a new evaluation object and run
"eval.crossValidateModel(x,trainingInstances...);" I then run
I want to make sure/clarify that what I am doing when I call these methods
is that I am training the model using cross validation with my
trainingInstances and then evaluating the trained model on my testInstances.
EDIT: to give more context - when i remove the code that involves crossvalidation on my training data the eval.truepositive... and other eval metrics are awful. So i want to make sure that the metrics i extract when i include CV on training data are not based on the crossvalidation of the trainingdata but on the evaluation of my test data.
Don't combine the results of a cross-validation with one from a test set. You need to create two different Evaluation objects.
Also, the crossValidateModel method should not be called with a built model, only a configured one. Internally, the method creates copies of the classifier (one for each train/test fold pair of k-fold CV), which will take unnecessarily long if you pass in a large model object.