<PMML version="4.0" xsi:schemaLocation="http://www.dmg.org/PMML-4_0 http://www.dmg.org/v4-0/pmml-4-0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.dmg.org/PMML-4_0">
    <Header copyright="Copyright (c) 2009 Zementis, Inc. (www.zementis.com)" description="Naive Bayes model">
        <Timestamp>July 29, 2009</Timestamp>
    </Header>
    <DataDictionary numberOfFields="5">
        <DataField dataType="string" name="gender" optype="categorical">
            <Value value="female" />
            <Value value="male" />
        </DataField>
        <DataField dataType="string" name="no of claims" optype="categorical">
            <Value value="0" />
            <Value value="1" />
            <Value value="2" />
            <Value value=">2" />
        </DataField>
        <DataField dataType="string" name="domicile" optype="categorical">
            <Value value="suburban" />
            <Value value="urban" />
            <Value value="rural" />
        </DataField>
        <DataField dataType="double" name="age of car" optype="continuous" />
        <DataField dataType="integer" name="amount" optype="categorical">
            <Value value="100" />
            <Value value="500" />
            <Value value="1000" />
            <Value value="5000" />
            <Value value="10000" />
        </DataField>
    </DataDictionary>
    <NaiveBayesModel functionName="classification" modelName="NaiveBayes" threshold="0.001">
        <MiningSchema>
            <MiningField name="gender" />
            <MiningField name="no of claims" />
            <MiningField name="domicile" />
            <MiningField name="age of car" />
            <MiningField name="amount" usageType="predicted" />
        </MiningSchema>
        <Output>
            <OutputField dataType="integer" feature="predictedValue" name="amount of claims" optype="categorical" />
            <OutputField dataType="double" feature="probability" name="Prob100" optype="continuous" value="100" />
            <OutputField dataType="double" feature="probability" name="Prob500" optype="continuous" value="500" />
            <OutputField dataType="double" feature="probability" name="Prob1000" optype="continuous" value="1000" />
            <OutputField dataType="double" feature="probability" name="Prob5000" optype="continuous" value="5000" />
            <OutputField dataType="double" feature="probability" name="Prob10000" optype="continuous" value="10000" />
        </Output>
        <BayesInputs>
            <BayesInput fieldName="gender">
                <PairCounts value="male">
                    <TargetValueCounts>
                        <TargetValueCount count="522" value="100" />
                        <TargetValueCount count="1016" value="500" />
                        <TargetValueCount count="567" value="1000" />
                        <TargetValueCount count="307" value="5000" />
                        <TargetValueCount count="393" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value="female">
                    <TargetValueCounts>
                        <TargetValueCount count="3223" value="100" />
                        <TargetValueCount count="1649" value="500" />
                        <TargetValueCount count="1809" value="1000" />
                        <TargetValueCount count="2473" value="5000" />
                        <TargetValueCount count="2120" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
            </BayesInput>
            <BayesInput fieldName="no of claims">
                <PairCounts value="0">
                    <TargetValueCounts>
                        <TargetValueCount count="353" value="100" />
                        <TargetValueCount count="469" value="500" />
                        <TargetValueCount count="473" value="1000" />
                        <TargetValueCount count="0" value="5000" />
                        <TargetValueCount count="526" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value="1">
                    <TargetValueCounts>
                        <TargetValueCount count="793" value="100" />
                        <TargetValueCount count="333" value="500" />
                        <TargetValueCount count="123" value="1000" />
                        <TargetValueCount count="1146" value="5000" />
                        <TargetValueCount count="546" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value="2">
                    <TargetValueCounts>
                        <TargetValueCount count="632" value="100" />
                        <TargetValueCount count="236" value="500" />
                        <TargetValueCount count="542" value="1000" />
                        <TargetValueCount count="1124" value="5000" />
                        <TargetValueCount count="3" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value=">2">
                    <TargetValueCounts>
                        <TargetValueCount count="1567" value="100" />
                        <TargetValueCount count="1527" value="500" />
                        <TargetValueCount count="1138" value="1000" />
                        <TargetValueCount count="510" value="5000" />
                        <TargetValueCount count="1438" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
            </BayesInput>
            <BayesInput fieldName="domicile">
                <PairCounts value="suburban">
                    <TargetValueCounts>
                        <TargetValueCount count="1180" value="100" />
                        <TargetValueCount count="649" value="500" />
                        <TargetValueCount count="1056" value="1000" />
                        <TargetValueCount count="1238" value="5000" />
                        <TargetValueCount count="1049" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value="urban">
                    <TargetValueCounts>
                        <TargetValueCount count="1202" value="100" />
                        <TargetValueCount count="927" value="500" />
                        <TargetValueCount count="106" value="1000" />
                        <TargetValueCount count="272" value="5000" />
                        <TargetValueCount count="371" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value="rural">
                    <TargetValueCounts>
                        <TargetValueCount count="1163" value="100" />
                        <TargetValueCount count="989" value="500" />
                        <TargetValueCount count="1014" value="1000" />
                        <TargetValueCount count="1265" value="5000" />
                        <TargetValueCount count="1092" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
            </BayesInput>
            <BayesInput fieldName="age of car">
                <DerivedField dataType="double" optype="continuous">
                    <Discretize field="age of car">
                        <DiscretizeBin binValue="0">
                            <Interval closure="closedOpen" leftMargin="0" rightMargin="1" />
                        </DiscretizeBin>
                        <DiscretizeBin binValue="1">
                            <Interval closure="closedOpen" leftMargin="1" rightMargin="5" />
                        </DiscretizeBin>
                        <DiscretizeBin binValue="2">
                            <Interval closure="closedOpen" leftMargin="5" />
                        </DiscretizeBin>
                    </Discretize>
                </DerivedField>
                <PairCounts value="0">
                    <TargetValueCounts>
                        <TargetValueCount count="1731" value="100" />
                        <TargetValueCount count="979" value="500" />
                        <TargetValueCount count="934" value="1000" />
                        <TargetValueCount count="718" value="5000" />
                        <TargetValueCount count="1184" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value="1">
                    <TargetValueCounts>
                        <TargetValueCount count="197" value="100" />
                        <TargetValueCount count="768" value="500" />
                        <TargetValueCount count="734" value="1000" />
                        <TargetValueCount count="688" value="5000" />
                        <TargetValueCount count="217" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
                <PairCounts value="2">
                    <TargetValueCounts>
                        <TargetValueCount count="1817" value="100" />
                        <TargetValueCount count="918" value="500" />
                        <TargetValueCount count="708" value="1000" />
                        <TargetValueCount count="1374" value="5000" />
                        <TargetValueCount count="1112" value="10000" />
                    </TargetValueCounts>
                </PairCounts>
            </BayesInput>
        </BayesInputs>
        <BayesOutput fieldName="amount">
            <TargetValueCounts>
                <TargetValueCount count="3745" value="100" />
                <TargetValueCount count="2665" value="500" />
                <TargetValueCount count="2376" value="1000" />
                <TargetValueCount count="2780" value="5000" />
                <TargetValueCount count="2513" value="10000" />
            </TargetValueCounts>
        </BayesOutput>
    </NaiveBayesModel>
</PMML>
