<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PMML version="4.2" xsi:schemaLocation="http://www.dmg.org/PMML-4_2 http://www.dmg.org/v4-1/pmml-4-2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.dmg.org/PMML-4_2">
  <Header description="generated by the drools-scorecards module">
    <Extension name="modelPackage" value="org.kie.scorecards.example"/>
    <Extension name="importsFromDelimitedString" value="java.util.*"/>
    <Timestamp>2012.10.07 at 17:04:37 MST</Timestamp>
  </Header>
  <DataDictionary numberOfFields="5">
    <DataField name="age" optype="continuous" dataType="double"/>
    <DataField name="occupation" optype="categorical" dataType="string">
      <Value value="SKYDIVER" />
      <Value value="ASTRONAUT" />
      <Value value="PROGRAMMER" />
      <Value value="TEACHER" />
      <Value value="INSTRUCTOR" />
    </DataField>
    <DataField name="residenceState" optype="categorical" dataType="string">
      <Value value="AP" />
      <Value value="KN" />
      <Value value="TN" />
    </DataField>
    <DataField name="validLicense" optype="categorical" dataType="boolean"/>
    <DataField name="overallScore" optype="continuous" dataType="double" />
  </DataDictionary>
  <Scorecard modelName="Sample Score" useReasonCodes="true" isScorable="true" functionName="regression" baselineScore="0.0" initialScore="0.345">
    <MiningSchema>
      <MiningField name="age" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="occupation" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="residenceState" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="validLicense" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="overallScore" usageType="predicted"/>
    </MiningSchema>
    <Output>
      <OutputField name="calculatedScore" displayName="Final Score" dataType="double" feature="predictedValue" targetField="overallScore"/>
    </Output>
    <Characteristics>
      <Characteristic name="AgeScore" baselineScore="0.0" reasonCode="ABZ">
        <Extension name="cellRef" value="$B$8"/>
        <Attribute partialScore="10.0">
          <Extension name="cellRef" value="$C$10"/>
          <SimplePredicate field="age" operator="lessOrEqual" value="5"/>
        </Attribute>
        <Attribute partialScore="30.0" reasonCode="CX1">
          <Extension name="cellRef" value="$C$11"/>
          <CompoundPredicate booleanOperator="and">
            <SimplePredicate field="age" operator="greaterOrEqual" value="5"/>
            <SimplePredicate field="age" operator="lessThan" value="12"/>
          </CompoundPredicate>
        </Attribute>
        <Attribute partialScore="40.0" reasonCode="CX2">
          <Extension name="cellRef" value="$C$12"/>
          <CompoundPredicate booleanOperator="and">
            <SimplePredicate field="age" operator="greaterOrEqual" value="13"/>
            <SimplePredicate field="age" operator="lessThan" value="44"/>
          </CompoundPredicate>
        </Attribute>
        <Attribute partialScore="25.0">
          <Extension name="cellRef" value="$C$13"/>
          <SimplePredicate field="age" operator="greaterOrEqual" value="45"/>
        </Attribute>
      </Characteristic>
      <Characteristic name="OccupationScore" baselineScore="0.0" reasonCode="OCC">
        <Extension name="cellRef" value="$B$16"/>
        <Attribute partialScore="-10.0" reasonCode="CX2">
          <Extension name="description" value="skydiving is a risky occupation"/>
          <Extension name="cellRef" value="$C$18"/>
          <SimpleSetPredicate field="occupation" booleanOperator="isIn">
            <Array n="2" type="string">SKYDIVER ASTRONAUT</Array>
          </SimpleSetPredicate>
        </Attribute>
        <Attribute partialScore="10.0">
          <Extension name="cellRef" value="$C$19"/>
          <SimpleSetPredicate field="occupation" booleanOperator="isIn">
            <Array n="2" type="string">TEACHER INSTRUCTOR</Array>
          </SimpleSetPredicate>
        </Attribute>
        <Attribute partialScore="5.0">
          <Extension name="cellRef" value="$C$20"/>
          <SimpleSetPredicate field="occupation" booleanOperator="isIn">
            <Array n="2" type="string">PROGRAMMER STUDENT</Array>
          </SimpleSetPredicate>
        </Attribute>
      </Characteristic>
      <Characteristic name="ResidenceStateScore" baselineScore="0.0" reasonCode="RES">
        <Extension name="cellRef" value="$B$22"/>
        <Attribute partialScore="-10.0">
          <Extension name="cellRef" value="$C$24"/>
          <SimplePredicate field="residenceState" operator="equal" value="AP"/>
        </Attribute>
        <Attribute partialScore="10.0">
          <Extension name="cellRef" value="$C$25"/>
          <SimplePredicate field="residenceState" operator="equal" value="KN"/>
        </Attribute>
        <Attribute partialScore="5.0">
          <Extension name="cellRef" value="$C$26"/>
          <SimplePredicate field="residenceState" operator="equal" value="TN"/>
        </Attribute>
      </Characteristic>
      <Characteristic name="ValidLicenseScore" baselineScore="0.0">
        <Extension name="cellRef" value="$B$28"/>
        <Attribute partialScore="1.0" reasonCode="LX00">
          <Extension name="cellRef" value="$C$30"/>
          <SimplePredicate field="validLicense" operator="equal" value="true"/>
        </Attribute>
        <Attribute partialScore="-1.0" reasonCode="LX00">
          <Extension name="cellRef" value="$C$31"/>
          <SimplePredicate field="validLicense" operator="equal" value="false"/>
        </Attribute>
      </Characteristic>
    </Characteristics>
  </Scorecard>
</PMML>