Skip to content
lisahua edited this page Jul 31, 2014 · 6 revisions

Table of Content

       <PMML xmlns="http://www.dmg.org/PMML-4_2" version="4.2">
           <DataDictionary numberOfFields="32">
               <DataField name="id" optype="ordinal" dataType="string"/>
               <DataField name="diagnosis" optype="categorical" dataType="string"/>
               <DataField name="mean_radius" optype="continuous" dataType="double"/>
       	… 
          </DataDictionary>
           <NeuralNetwork modelName="demoModel" functionName="regression">
               <MiningSchema>
                   <MiningField name="id" usageType="supplementary" optype="ordinal"/>
                   <MiningField name="diagnosis" usageType="target" optype="categorical"/>
                   <MiningField name="mean_radius" usageType="active" optype="continuous"/>
       		…	
               </MiningSchema>
               <ModelStats>… </ModelStats>
               <Targets>
                   <Target field="diagnosis" optype="categorical">
                       <TargetValue value="M" displayValue="Malignant"/>
                       <TargetValue value="B" displayValue="Benign"/>
                   </Target>
               </Targets>
               <LocalTransformations>
                   <DerivedField name="diagnosis_transformed" optype="categorical" dataType="string">
                       <MapValues outputColumn="transformed">
                            <FieldColumnPair field="diagnosis" column="origin"/>
                            <InlineTable>
                                <row>
                                    <origin xmlns:ns2="http://www.dmg.org/PMML-4_2" xmlns="">M</origin>
                                    <transformed xmlns:ns2="http://www.dmg.org/PMML-4_2" xmlns="">1</transformed>
                               </row>
                               <row>
                                    <origin xmlns:ns2="http://www.dmg.org/PMML-4_2" xmlns="">B</origin>
                                    <transformed xmlns:ns2="http://www.dmg.org/PMML-4_2" xmlns="">0</transformed>
                               </row>
                            </InlineTable>
                         </MapValues>
                   </DerivedField>
                   <DerivedField name="mean_radius_transformed" optype="continuous" dataType="double">
                       <NormContinuous field="mean_radius">
                           <LinearNorm orig="0.0" norm="-4.00761373022065"/>
                           <LinearNorm orig="14.12049119718311" norm="0.0"/>
                       </NormContinuous>
                   </DerivedField>
                   … 
                   <DerivedField name="bias" optype="continuous" dataType="double">
                       <Constant>1</Constant>
                   </DerivedField>
               </LocalTransformations>
               <NeuralInputs>
                   <NeuralInput id="0,0">
                       <DerivedField name="mean_radius_transformed" optype="continuous" dataType="double">
                           <FieldRef field="mean_radius_transformed"/>
                       </DerivedField>
                   </NeuralInput>
                   … 
                   <NeuralInput id="bias">
                       <DerivedField name="bias" optype="continuous" dataType="double">
                           <FieldRef field="bias"/>
                       </DerivedField>
                   </NeuralInput>
               </NeuralInputs>
               <NeuralLayer numberOfNeurons="45" activationFunction="logistic">
                   <Neuron id="1,0" bias="0.0">
                       <Con from="0,0" weight="0.3037207148"/>
       		… 
                       <Con from="bias" weight="0.9403597911"/>
                   </Neuron>
       		… 
               </NeuralLayer>
               <NeuralOutputs numberOfOutputs="1">
                   <NeuralOutput outputNeuron="3,0">
                       <DerivedField optype="continuous" dataType="double">
                           <FieldRef field="diagnosis"/>
                       </DerivedField>
                   </NeuralOutput>
               </NeuralOutputs>
           </NeuralNetwork>
       </PMML>
          <PMML xmlns="http://www.dmg.org/PMML-4_2" version="4.2">
             <DataDictionary>...</DataDictionary>
             <RegressionModel functionName="regression" targetFieldName="diagnosis" normalizationMethod="logit">
                <MiningSchema>...</MiningSchema>
                <ModelStats></ModelStats>
                <Targets>...</Targets>
                <LocalTransformatins>...</LocalTransformatins>
                <RegressionTable intercept="0.0">
                   <NumericPredictor name="mean_radius_transformed" coefficient="0.42003812725775186"/>...
                   <NumericPredictor name=“bias” coefficient="0.42003812725775186"/>
                </RegressionTable>
             </RegressionModel>
          </PMML>

Notes:

  • PMML 4.2 - Changes from PMML 4.1:

    Changed value of attribute 'usageType' in element MiningSchema from "predicted" to "target" in the example(s)

Clone this wiki locally