<?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="Neural Network for multi-class classification using the Iris dataset">
        <Timestamp>Feb 15, 2008</Timestamp>
    </Header>
    <DataDictionary numberOfFields="5">
        <DataField name="class" optype="categorical" dataType="string">
            <Value value="Iris-setosa" />
            <Value value="Iris-versicolor" />
            <Value value="Iris-virginica" />
        </DataField>
        <DataField name="sepal_length" optype="continuous" dataType="double" />
        <DataField name="sepal_width" optype="continuous" dataType="double" />
        <DataField name="petal_length" optype="continuous" dataType="double" />
        <DataField name="petal_width" optype="continuous" dataType="double" />
    </DataDictionary>
    <TransformationDictionary>
        <DerivedField name="derived_sepal_length" dataType="double" optype="continuous">
            <NormContinuous field="sepal_length">
                <LinearNorm orig="4.3" norm="0" />
                <LinearNorm orig="7.9" norm="1" />
            </NormContinuous>
        </DerivedField>
        <DerivedField name="derived_sepal_width" dataType="double" optype="continuous">
            <NormContinuous field="sepal_width">
                <LinearNorm orig="2" norm="0" />
                <LinearNorm orig="4.2" norm="1" />
            </NormContinuous>
        </DerivedField>
        <DerivedField name="derived_petal_length" dataType="double" optype="continuous">
            <NormContinuous field="petal_length">
                <LinearNorm orig="1" norm="0" />
                <LinearNorm orig="6.7" norm="1" />
            </NormContinuous>
        </DerivedField>
        <DerivedField name="derived_petal_width" dataType="double" optype="continuous">
            <NormContinuous field="petal_width">
                <LinearNorm orig="0.1" norm="0" />
                <LinearNorm orig="2.5" norm="1" />
            </NormContinuous>
        </DerivedField>
    </TransformationDictionary>
    <NeuralNetwork modelName="Iris_NN" functionName="classification" activationFunction="tanh">
        <MiningSchema>
            <MiningField name="sepal_length" />
            <MiningField name="sepal_width" />
            <MiningField name="petal_length" />
            <MiningField name="petal_width" />
            <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>
        <NeuralInputs>
            <NeuralInput id="0">
                <DerivedField dataType="double" optype="continuous">
                    <FieldRef field="derived_sepal_length" />
                </DerivedField>
            </NeuralInput>
            <NeuralInput id="1">
                <DerivedField dataType="double" optype="continuous">
                    <FieldRef field="derived_sepal_width" />
                </DerivedField>
            </NeuralInput>
            <NeuralInput id="2">
                <DerivedField dataType="double" optype="continuous">
                    <FieldRef field="derived_petal_length" />
                </DerivedField>
            </NeuralInput>
            <NeuralInput id="3">
                <DerivedField dataType="double" optype="continuous">
                    <FieldRef field="derived_petal_width" />
                </DerivedField>
            </NeuralInput>
        </NeuralInputs>
        <NeuralLayer numberOfNeurons="7">
            <Neuron id="4" bias="-3.1808306946637">
                <Con from="0" weight="0.119477686963504" />
                <Con from="1" weight="-1.97301278112877" />
                <Con from="2" weight="3.04381251760906" />
                <Con from="3" weight="3.15301106009219" />
            </Neuron>
            <Neuron id="5" bias="0.743161353729323">
                <Con from="0" weight="-0.49411146396721" />
                <Con from="1" weight="2.18588757615864" />
                <Con from="2" weight="-2.01213331163562" />
                <Con from="3" weight="-2.24876157580694" />
            </Neuron>
            <Neuron id="6" bias="2.78015999806623">
                <Con from="0" weight="0.698914736692746" />
                <Con from="1" weight="0.609036062613767" />
                <Con from="2" weight="-2.32205563516782" />
                <Con from="3" weight="-2.49005569672396" />
            </Neuron>
            <Neuron id="7" bias="-0.242443081378709">
                <Con from="0" weight="0.692914337246382" />
                <Con from="1" weight="-2.22394844100301" />
                <Con from="2" weight="1.79155072988797" />
                <Con from="3" weight="1.85405639315114" />
            </Neuron>
            <Neuron id="8" bias="0.497692088665534">
                <Con from="0" weight="0.401632702553275" />
                <Con from="1" weight="-0.308630011832467" />
                <Con from="2" weight="0.333068900531663" />
                <Con from="3" weight="0.498711214873343" />
            </Neuron>
            <Neuron id="9" bias="-0.487747130915523">
                <Con from="0" weight="0.265866786707193" />
                <Con from="1" weight="-0.219621607568115" />
                <Con from="2" weight="-0.10505715245381" />
                <Con from="3" weight="-0.485585824586451" />
            </Neuron>
            <Neuron id="10" bias="-0.39489466836676">
                <Con from="0" weight="-0.454608819447458" />
                <Con from="1" weight="0.255358616821468" />
                <Con from="2" weight="-0.320622621569782" />
                <Con from="3" weight="-0.383352213073522" />
            </Neuron>
        </NeuralLayer>
        <NeuralLayer numberOfNeurons="3" activationFunction="identity" normalizationMethod="softmax">
            <Neuron id="11" bias="0.236423303347821">
                <Con from="4" weight="-2.15599346604967" />
                <Con from="5" weight="3.86270296048408" />
                <Con from="6" weight="2.15564109645499" />
                <Con from="7" weight="-4.23659804991471" />
                <Con from="8" weight="0.0280532835445625" />
                <Con from="9" weight="-0.0114381327293813" />
                <Con from="10" weight="0.0448122713714838" />
            </Neuron>
            <Neuron id="12" bias="1.39778106844978">
                <Con from="4" weight="-2.74739777004494" />
                <Con from="5" weight="-0.0887790425169521" />
                <Con from="6" weight="1.9372707807315" />
                <Con from="7" weight="1.56854837069643" />
                <Con from="8" weight="-0.00991328499550186" />
                <Con from="9" weight="0.442540002521127" />
                <Con from="10" weight="0.250962238758802" />
            </Neuron>
            <Neuron id="13" bias="-2.37462604275229">
                <Con from="4" weight="4.55436720245505" />
                <Con from="5" weight="-3.12707134738123" />
                <Con from="6" weight="-4.94467846628417" />
                <Con from="7" weight="1.96593486618851" />
                <Con from="8" weight="-0.244750133836107" />
                <Con from="9" weight="0.434496770147234" />
                <Con from="10" weight="0.313301702495664" />
            </Neuron>
        </NeuralLayer>
        <NeuralOutputs>
            <NeuralOutput outputNeuron="11">
                <DerivedField name="derived_classIris-setosa" dataType="string" optype="categorical">
                    <NormDiscrete field="class" value="Iris-setosa" />
                </DerivedField>
            </NeuralOutput>
            <NeuralOutput outputNeuron="12">
                <DerivedField name="derived_classIris-versicolor" dataType="string" optype="categorical">
                    <NormDiscrete field="class" value="Iris-versicolor" />
                </DerivedField>
            </NeuralOutput>
            <NeuralOutput outputNeuron="13">
                <DerivedField name="derived_classIris-virginica" dataType="string" optype="categorical">
                    <NormDiscrete field="class" value="Iris-virginica" />
                </DerivedField>
            </NeuralOutput>
        </NeuralOutputs>
    </NeuralNetwork>
</PMML>
