WEKA Explorer seems to come up with two different models for OneR (rules) and Decision stump (trees). Is has to be the underlying measure of "best split" that is different. But for a single split on just one attribute this should still result in exactly the same model (I would assume). Or not?

(Java source code is quite verbose, I couldn't find the answer yet)




1 Answer 1


The first difference is that Weka's OneR can only predict nominal class values, while DecisionStump is able to predict both nominal and numeric values.

The algorithm used by OneR is:

For each attribute,
    For each value of the attribute, make a rule as follows:
        count how often each class appears
        find the most frequent class
        make the rule assign that class to this attribute-value
    Calculate the error rate of this attribute’s rules
Choose the attribute with the smallest error rate

(Source: Data Mining with Weka — Lesson 3.1 Simplicity First! by Ian H. Witten, page 5. See https://www.saedsayad.com/oner.htm for a worked example.)

In contrast, for classification problems, DecisionStump determines the split by using entropy. For regression problems, DecisionStump chooses the split that minimizes mean square error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.