private static int buildTreeNode(FastRandomTree node, int nodeId, Node parentPMMLNode) {
        Instances instance = node.m_MotherForest.m_Info;

        addScoreDistribution(parentPMMLNode, node.m_ClassProbs, instance);

        if (node.m_Attribute == -1) {
            // Leaf: Add the node's score.
            parentPMMLNode.withScore(leafScoreFromDistribution(node.m_ClassProbs, instance));
            return nodeId;
        }

        Attribute attribute = instance.attribute(node.m_Attribute);

        if (attribute.isNominal()) {
            return buildNominalNode(attribute, node, nodeId, parentPMMLNode);
        } else if (attribute.isNumeric()) {
            return buildNumericNode(attribute, node, nodeId, parentPMMLNode);
        } else {
            throw new RuntimeException("Unsupported attribute type for: " + attribute);
        }
    }
private static int buildTreeNode(FastRandomTree node, int nodeId, Node parentPMMLNode) {
        Instances instance = node.m_MotherForest.m_Info;

        addScoreDistribution(parentPMMLNode, node.m_ClassProbs, instance);

        if (node.m_Attribute == -1) {
            
            parentPMMLNode.withScore(leafScoreFromDistribution(node.m_ClassProbs, instance));
            return nodeId;
        }

        Attribute attribute = instance.attribute(node.m_Attribute);

        if (attribute.isNominal()) {
            return buildNominalNode(attribute, node, nodeId, parentPMMLNode);
        } else if (attribute.isNumeric()) {
            return buildNumericNode(attribute, node, nodeId, parentPMMLNode);
        } else {
            throw new RuntimeException("Unsupported attribute type for: " + attribute);
        }
    }
private static int buildTreeNode ( FastRandomTree node , int nodeId , Node parentPMMLNode ) { Instances instance = node . m_MotherForest . m_Info ; addScoreDistribution ( parentPMMLNode , node . m_ClassProbs , instance ) ; if ( node . m_Attribute == - 1 ) { // Leaf: Add the node's score. parentPMMLNode . withScore ( leafScoreFromDistribution ( node . m_ClassProbs , instance ) ) ; return nodeId ; } Attribute attribute = instance . attribute ( node . m_Attribute ) ; if ( attribute . isNominal ( ) ) { return buildNominalNode ( attribute , node , nodeId , parentPMMLNode ) ; } else if ( attribute . isNumeric ( ) ) { return buildNumericNode ( attribute , node , nodeId , parentPMMLNode ) ; } else { throw new RuntimeException ( "Unsupported attribute type for: " + attribute ) ; } }
Builds a new {@link org.dmg.pmml.Node PMML Node} from the given {@link weka.classifiers.trees.RandomTree.Tree Weka Tree Node}.

@param node           The Id to give to the generted {@link org.dmg.pmml.Node PMML Node}.
@param nodeId         The Id to give to the generted {@link org.dmg.pmml.Node PMML Node}.
@param parentPMMLNode The parent {@link org.dmg.pmml.Node PMML Node}.
@return The incremented Id given to recursively created {@link org.dmg.pmml.Node PMML Nodes}.
Builds a new { @link org . dmg . pmml . Node PMML Node } from the given { @link weka . classifiers . trees . RandomTree . Tree Weka Tree Node } .