src/main/java/weka/classifiers/trees/RandomForestPMMLProducer.java
private static Segment buildSegment(MiningSchema miningSchema, int segmentId, RandomTree randomTree) {
        int rootNodeId = 1;

        Node rootNode = new Node().withId(String.valueOf(rootNodeId)).withPredicate(new True());
        TreeModel treeModel = new TreeModel(miningSchema, rootNode, MiningFunctionType.CLASSIFICATION).withAlgorithmName(ALGORITHM_NAME).withModelName(MODEL_NAME).withSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT);

        buildTreeNode(randomTree, randomTree.m_Tree, rootNodeId, rootNode);

        Segment segment = new Segment();
        segment.withId(String.valueOf(segmentId));
        segment.withModel(treeModel);

        return segment;
    }
private static Segment buildSegment(MiningSchema miningSchema, int segmentId, RandomTree randomTree) {
        int rootNodeId = 1;

        Node rootNode = new Node().withId(String.valueOf(rootNodeId)).withPredicate(new True());
        TreeModel treeModel = new TreeModel(miningSchema, rootNode, MiningFunctionType.CLASSIFICATION).withAlgorithmName(ALGORITHM_NAME).withModelName(MODEL_NAME).withSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT);

        buildTreeNode(randomTree, randomTree.m_Tree, rootNodeId, rootNode);

        Segment segment = new Segment();
        segment.withId(String.valueOf(segmentId));
        segment.withModel(treeModel);

        return segment;
    }
private static Segment buildSegment ( MiningSchema miningSchema , int segmentId , RandomTree randomTree ) { int rootNodeId = 1 ; Node rootNode = new Node ( ) . withId ( String . valueOf ( rootNodeId ) ) . withPredicate ( new True ( ) ) ; TreeModel treeModel = new TreeModel ( miningSchema , rootNode , MiningFunctionType . CLASSIFICATION ) . withAlgorithmName ( ALGORITHM_NAME ) . withModelName ( MODEL_NAME ) . withSplitCharacteristic ( TreeModel . SplitCharacteristic . MULTI_SPLIT ) ; buildTreeNode ( randomTree , randomTree . m_Tree , rootNodeId , rootNode ) ; Segment segment = new Segment ( ) ; segment . withId ( String . valueOf ( segmentId ) ) ; segment . withModel ( treeModel ) ; return segment ; }
Builds a {@link org.dmg.pmml.Segment PMML Segment} that contains the {@link org.dmg.pmml.TreeModel PMML TreeModel}
representing the given {@link weka.classifiers.trees.RandomTree Weka RandomTree}.

@param miningSchema The {@link org.dmg.pmml.MiningSchema PMML MiningSchema} that lists fields as used in the model.
@param segmentId    The Id to given to the {@link org.dmg.pmml.Segment PMML Segment element}.
@param randomTree   The {@link weka.classifiers.trees.RandomTree Weka RandomTree} to be converted to a {@link org.dmg.pmml.TreeModel PMML TreeModel}.
@return The created {@link org.dmg.pmml.Segment PMML Segment}.
Builds a { @link org . dmg . pmml . Segment PMML Segment } that contains the { @link org . dmg . pmml . TreeModel PMML TreeModel } representing the given { @link weka . classifiers . trees . RandomTree Weka RandomTree } .