<?xml version="1.0" encoding="UTF-8"?>
<PMML xmlns="http://www.dmg.org/PMML-3_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.dmg.org/PMML-3_2 http://www.dmg.org/v3-2/pmml-3-2.xsd" version="3.2">
    <Header copyright="Copyright (c) 2008 Zementis, Inc. (www.zementis.com)"
        description="Classification Tree using the Iris dataset">
        <Timestamp>Jun 15, 2008</Timestamp>
    </Header>
    <DataDictionary numberOfFields="5">
        <DataField name="sepal_length" dataType="double" optype="continuous" />
        <DataField name="sepal_width" dataType="double" optype="continuous" />
        <DataField name="petal_length" dataType="double" optype="continuous" />
        <DataField name="petal_width" dataType="double" optype="continuous" />
        <DataField name="class" dataType="string" optype="categorical">
            <Value value="Iris-setosa" property="valid" />
            <Value value="Iris-versicolor" property="valid" />
            <Value value="Iris-virginica" property="valid" />
        </DataField>
    </DataDictionary>
    <TreeModel modelName="IrisCARTDecisionTree" algorithmName="CART" functionName="classification">
        <MiningSchema>
            <MiningField name="petal_length" usageType="active" />
            <MiningField name="petal_width" usageType="active" />
            <MiningField name="sepal_length" usageType="active" />
            <MiningField name="sepal_width" usageType="active" />
            <MiningField name="class" usageType="predicted" />
        </MiningSchema>
		<Output>
            <OutputField name = "Probability_setosa" optype = "continuous" dataType = "double" feature = "probability" value="Iris-setosa" />
            <OutputField name = "Probability_versicolor" optype = "continuous" dataType = "double" feature = "probability" value="Iris-versicolor" /> 
            <OutputField name = "Probability_virginica" optype = "continuous" dataType = "double" feature = "probability" value="Iris-virginica" />
        </Output>
        <Node score="Iris-setosa" recordCount="150" id="0">
            <True />
            <ScoreDistribution recordCount="50" value="Iris-setosa" />
            <ScoreDistribution recordCount="50" value="Iris-versicolor" />
            <ScoreDistribution recordCount="50" value="Iris-virginica" />
            <Node score="Iris-setosa" recordCount="50" id="1">
                <CompoundPredicate booleanOperator="surrogate">
                    <CompoundPredicate booleanOperator="and">
                        <True />
                        <SimplePredicate field="petal_length" operator="lessOrEqual" value="2.45" />
                    </CompoundPredicate>
                    <CompoundPredicate booleanOperator="and">
                        <True />
                        <SimplePredicate field="petal_width" operator="lessOrEqual" value="0.8" />
                    </CompoundPredicate>
                    <CompoundPredicate booleanOperator="and">
                        <True />
                        <SimplePredicate field="sepal_length" operator="lessOrEqual" value="5.45" />
                    </CompoundPredicate>
                    <CompoundPredicate booleanOperator="and">
                        <SimplePredicate field="sepal_width" operator="greaterThan" value="3.35" />
                        <True />
                    </CompoundPredicate>
                    <False />
                </CompoundPredicate>
                <ScoreDistribution recordCount="50" value="Iris-setosa" />
                <ScoreDistribution recordCount="0" value="Iris-versicolor" />
                <ScoreDistribution recordCount="0" value="Iris-virginica" />
            </Node>
            <Node score="Iris-versicolor" recordCount="100" id="2">
                <CompoundPredicate booleanOperator="surrogate">
                    <CompoundPredicate booleanOperator="and">
                        <SimplePredicate field="petal_length" operator="greaterThan" value="2.45" />
                        <True />
                    </CompoundPredicate>
                    <CompoundPredicate booleanOperator="and">
                        <SimplePredicate field="petal_width" operator="greaterThan" value="0.8" />
                        <True />
                    </CompoundPredicate>
                    <CompoundPredicate booleanOperator="and">
                        <SimplePredicate field="sepal_length" operator="greaterThan" value="5.45" />
                        <True />
                    </CompoundPredicate>
                    <CompoundPredicate booleanOperator="and">
                        <True />
                        <SimplePredicate field="sepal_width" operator="lessOrEqual" value="3.35" />
                    </CompoundPredicate>
                    <True />
                </CompoundPredicate>
                <ScoreDistribution recordCount="0" value="Iris-setosa" />
                <ScoreDistribution recordCount="50" value="Iris-versicolor" />
                <ScoreDistribution recordCount="50" value="Iris-virginica" />
                <Node score="Iris-versicolor" recordCount="54" id="3">
                    <CompoundPredicate booleanOperator="surrogate">
                        <CompoundPredicate booleanOperator="and">
                            <True />
                            <SimplePredicate field="petal_width" operator="lessOrEqual" value="1.75" />
                        </CompoundPredicate>
                        <CompoundPredicate booleanOperator="and">
                            <True />
                            <SimplePredicate field="petal_length" operator="lessOrEqual" value="4.75" />
                        </CompoundPredicate>
                        <CompoundPredicate booleanOperator="and">
                            <True />
                            <SimplePredicate field="sepal_length" operator="lessOrEqual" value="6.15" />
                        </CompoundPredicate>
                        <CompoundPredicate booleanOperator="and">
                            <True />
                            <SimplePredicate field="sepal_width" operator="lessOrEqual" value="2.95" />
                        </CompoundPredicate>
                        <True />
                    </CompoundPredicate>
                    <ScoreDistribution recordCount="0" value="Iris-setosa" />
                    <ScoreDistribution recordCount="49" value="Iris-versicolor" />
                    <ScoreDistribution recordCount="5" value="Iris-virginica" />
                    <Node score="Iris-versicolor" recordCount="48" id="5">
                        <CompoundPredicate booleanOperator="surrogate">
                            <CompoundPredicate booleanOperator="and">
                                <True />
                                <SimplePredicate field="petal_length" operator="lessOrEqual" value="4.95" />
                            </CompoundPredicate>
                            <CompoundPredicate booleanOperator="and">
                                <True />
                                <SimplePredicate field="sepal_length" operator="lessOrEqual" value="7.1" />
                            </CompoundPredicate>
                            <True />
                        </CompoundPredicate>
                        <ScoreDistribution recordCount="0" value="Iris-setosa" />
                        <ScoreDistribution recordCount="47" value="Iris-versicolor" />
                        <ScoreDistribution recordCount="1" value="Iris-virginica" />
                    </Node>
                    <Node score="Iris-virginica" recordCount="6" id="6">
                        <CompoundPredicate booleanOperator="surrogate">
                            <CompoundPredicate booleanOperator="and">
                                <SimplePredicate field="petal_length" operator="greaterThan" value="4.95" />
                                <True />
                            </CompoundPredicate>
                            <CompoundPredicate booleanOperator="and">
                                <SimplePredicate field="sepal_length" operator="greaterThan" value="7.1" />
                                <True />
                            </CompoundPredicate>
                            <False />
                        </CompoundPredicate>
                        <ScoreDistribution recordCount="0" value="Iris-setosa" />
                        <ScoreDistribution recordCount="2" value="Iris-versicolor" />
                        <ScoreDistribution recordCount="4" value="Iris-virginica" />
                        <Node score="Iris-virginica" recordCount="3" id="9">
                            <CompoundPredicate booleanOperator="surrogate">
                                <CompoundPredicate booleanOperator="and">
                                    <True />
                                    <SimplePredicate field="petal_width" operator="lessOrEqual" value="1.55" />
                                </CompoundPredicate>
                                <CompoundPredicate booleanOperator="and">
                                    <True />
                                    <SimplePredicate field="sepal_width" operator="lessOrEqual" value="2.65" />
                                </CompoundPredicate>
                                <CompoundPredicate booleanOperator="and">
                                    <True />
                                    <SimplePredicate field="sepal_length" operator="lessOrEqual" value="6.5" />
                                </CompoundPredicate>
                                <CompoundPredicate booleanOperator="and">
                                    <True />
                                    <SimplePredicate field="petal_length" operator="lessOrEqual" value="5.7" />
                                </CompoundPredicate>
                                <True />
                            </CompoundPredicate>
                            <ScoreDistribution recordCount="0" value="Iris-setosa" />
                            <ScoreDistribution recordCount="0" value="Iris-versicolor" />
                            <ScoreDistribution recordCount="3" value="Iris-virginica" />
                        </Node>
                        <Node score="Iris-versicolor" recordCount="3" id="10">
                            <CompoundPredicate booleanOperator="surrogate">
                                <CompoundPredicate booleanOperator="and">
                                    <SimplePredicate field="petal_width" operator="greaterThan" value="1.55" />
                                    <True />
                                </CompoundPredicate>
                                <CompoundPredicate booleanOperator="and">
                                    <SimplePredicate field="sepal_width" operator="greaterThan" value="2.65" />
                                    <True />
                                </CompoundPredicate>
                                <CompoundPredicate booleanOperator="and">
                                    <SimplePredicate field="sepal_length" operator="greaterThan" value="6.5" />
                                    <True />
                                </CompoundPredicate>
                                <CompoundPredicate booleanOperator="and">
                                    <SimplePredicate field="petal_length" operator="greaterThan" value="5.7" />
                                    <True />
                                </CompoundPredicate>
                                <False />
                            </CompoundPredicate>
                            <ScoreDistribution recordCount="0" value="Iris-setosa" />
                            <ScoreDistribution recordCount="2" value="Iris-versicolor" />
                            <ScoreDistribution recordCount="1" value="Iris-virginica" />
                        </Node>
                    </Node>
                </Node>
                <Node score="Iris-virginica" recordCount="46" id="4">
                    <CompoundPredicate booleanOperator="surrogate">
                        <CompoundPredicate booleanOperator="and">
                            <SimplePredicate field="petal_width" operator="greaterThan" value="1.75" />
                            <True />
                        </CompoundPredicate>
                        <CompoundPredicate booleanOperator="and">
                            <SimplePredicate field="petal_length" operator="greaterThan" value="4.75" />
                            <True />
                        </CompoundPredicate>
                        <CompoundPredicate booleanOperator="and">
                            <SimplePredicate field="sepal_length" operator="greaterThan" value="6.15" />
                            <True />
                        </CompoundPredicate>
                        <CompoundPredicate booleanOperator="and">
                            <SimplePredicate field="sepal_width" operator="greaterThan" value="2.95" />
                            <True />
                        </CompoundPredicate>
                        <False />
                    </CompoundPredicate>
                    <ScoreDistribution recordCount="0" value="Iris-setosa" />
                    <ScoreDistribution recordCount="1" value="Iris-versicolor" />
                    <ScoreDistribution recordCount="45" value="Iris-virginica" />
                    <Node score="Iris-virginica" recordCount="3" id="7">
                        <CompoundPredicate booleanOperator="surrogate">
                            <CompoundPredicate booleanOperator="and">
                                <True />
                                <SimplePredicate field="petal_length" operator="lessOrEqual" value="4.85" />
                            </CompoundPredicate>
                            <False />
                        </CompoundPredicate>
                        <ScoreDistribution recordCount="0" value="Iris-setosa" />
                        <ScoreDistribution recordCount="1" value="Iris-versicolor" />
                        <ScoreDistribution recordCount="2" value="Iris-virginica" />
                    </Node>
                    <Node score="Iris-virginica" recordCount="43" id="8">
                        <CompoundPredicate booleanOperator="surrogate">
                            <CompoundPredicate booleanOperator="and">
                                <SimplePredicate field="petal_length" operator="greaterThan" value="4.85" />
                                <True />
                            </CompoundPredicate>
                            <True />
                        </CompoundPredicate>
                        <ScoreDistribution recordCount="0" value="Iris-setosa" />
                        <ScoreDistribution recordCount="0" value="Iris-versicolor" />
                        <ScoreDistribution recordCount="43" value="Iris-virginica" />
                    </Node>
                </Node>
            </Node>
        </Node>
    </TreeModel>
</PMML>
