Example usage for weka.classifiers.trees.m5 RuleNode isLeaf

List of usage examples for weka.classifiers.trees.m5 RuleNode isLeaf

Introduction

In this page you can find the example usage for weka.classifiers.trees.m5 RuleNode isLeaf.

Prototype

public boolean isLeaf() 

Source Link

Document

Return true if this node is a leaf

Usage

From source file:cn.ict.zyq.bestConf.COMT2.COMT2.java

License:Open Source License

private static Instances getSiblings(M5P modelTree, Instance ins) {
    RuleNode node = modelTree.getM5RootNode();

    while (!node.isLeaf()) {
        if (ins.value(node.splitAtt()) <= node.splitVal()) {
            node = node.leftNode();/*from  w  w  w . j a  va2 s . c  o m*/
        } else {
            node = node.rightNode();
        }
    }

    return node.zyqGetTrainingSet();
}