In a 10-fold cross-validation, the learning algorithm (CVParameterSelection
in your case) will be run 10 times, on 10 different subsets of the data. It
is highly likely that those 10 runs will not all give the same result.
The model that WEKA outputs in the Classify panel is the one built by
applying the learning algorithm to *all* the data that has been loaded into
the Preprocess panel, regardless of which evaluation method you choose.
In the latest WEKA releases, there is a new option under More options... in
the Classify panel that allows you to additionally output all the models
built from the training splits used in the evaluation, e.g., the 10 models
built in the 10-fold cross-validation. Take a look at those models. You
will see that CVParameterSelection does not always choose the same
parameter values for each of the 10 subsets of data.
On Sat, 3 Nov 2018 at 1:37 PM, hfef7ui2 <hfef7ui2(a)gmail.com> wrote:
I am new to Weka and this maybe a noob question. I find a question similar
to mine on
I am confused about the answers.
Here is my question:
First I made a test using CVParameterSelection. In Classifier part I set
CVParameterSelection on J48 algorithm to determine the proper C value,
in Test Option part I chose Cross-Validation with 10 Folds. I let the
CVParameterSelection to find C from 0.1 to 0.5, and it showed that C=0.2
the best. It finally gave me a J48 pruned tree and some test results as the
Then I made another test. In Classifier part I manually set the C value to
0.2, and replaced the CVParameterSelection by a J48 algorithm directly. I
kept all the other settings unchanged. This test gave me a J48 pruned tree
which is exactly the same as what I got in the previous test, but the test
results are different. It seems the result of the second test is slightly
better than the previous one.
I wonder why it is like this. I think they should have the same result
they give me the same decision tree.
Sent from: http://weka.8497.n7.nabble.com/
Wekalist mailing list
Send posts to: Wekalist(a)list.waikato.ac.nz
To subscribe, unsubscribe, etc., visit