<?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-2-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="importsFromDelimitedString" value="java.util.*"/>
    <Timestamp>2012.10.07 at 17:04:37 MST</Timestamp>
  </Header>
  <DataDictionary numberOfFields="4">
    <DataField name="period" optype="categorical" dataType="string">
      <Value value="SPRING" />
      <Value value="SUMMER" />
      <Value value="AUTUMN" />
      <Value value="WINTER" />
    </DataField>
    <DataField name="worldcontinent" optype="categorical" dataType="string">
      <Value value="EUROPE" />
      <Value value="AFRICA" />
      <Value value="ASIA" />
      <Value value="AMERICA" />
    </DataField>
    <DataField name="precipitation" optype="categorical" dataType="boolean"/>
    <DataField name="humidity" optype="continuous" dataType="double" />
    <DataField name="overallScore" optype="continuous" dataType="double" />
  </DataDictionary>
  <Scorecard modelName="Forecast Score" useReasonCodes="false" isScorable="true" functionName="regression" baselineScore="0.0" initialScore="0.0">
    <MiningSchema>
      <MiningField name="period" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="worldcontinent" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="precipitation" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="humidity" usageType="active" invalidValueTreatment="asMissing"/>
      <MiningField name="overallScore" usageType="predicted"/>
    </MiningSchema>
    <Output>
      <OutputField name="forecastScore" displayName="Forecast Score" dataType="double" feature="predictedValue" targetField="overallScore"/>
    </Output>
    <Characteristics>

      <Characteristic name="PeriodScore" baselineScore="0.0">
        <Attribute partialScore="9.7">
          <SimplePredicate field="period" operator="equal" value="SPRING"/>
        </Attribute>
        <Attribute partialScore="10.0">
          <SimplePredicate field="period" operator="equal" value="SUMMER"/>
        </Attribute>
        <Attribute partialScore="8.3">
          <SimplePredicate field="period" operator="equal" value="AUTUMN"/>
        </Attribute>
        <Attribute partialScore="8.5">
          <SimplePredicate field="period" operator="equal" value="WINTER"/>
        </Attribute>
      </Characteristic>

      <Characteristic name="ContinentScore" baselineScore="0.0">
        <Attribute partialScore="-2.3">
          <Extension name="description" value="America and Asia have storms"/>
          <SimpleSetPredicate field="worldcontinent" booleanOperator="isIn">
            <Array n="2" type="string">AMERICA ASIA</Array>
          </SimpleSetPredicate>
        </Attribute>
        <Attribute partialScore="-1.9">
          <Extension name="description" value="Africa has dry/wet periods"/>
          <SimplePredicate field="worldcontinent" operator="equal" value="AFRICA" />
        </Attribute>
        <Attribute partialScore="1.1">
          <Extension name="description" value="Europe is fine"/>
          <SimplePredicate field="worldcontinent" operator="equal" value="EUROPE" />
        </Attribute>
      </Characteristic>

      <Characteristic name="PrecipitationScore" baselineScore="0.0" >
        <Attribute partialScore="-1.0">
          <SimplePredicate field="precipitation" operator="equal" value="true"/>
        </Attribute>
        <Attribute partialScore="0.8">
          <SimplePredicate field="precipitation" operator="equal" value="false"/>
        </Attribute>
      </Characteristic>

      <Characteristic name="HumidityScore" baselineScore="0.0">
        <Attribute partialScore="3.3">
          <CompoundPredicate booleanOperator="and">
            <SimplePredicate field="humidity" operator="greaterOrEqual" value="30"/>
            <SimplePredicate field="humidity" operator="lessThan" value="60"/>
          </CompoundPredicate>
        </Attribute>
        <Attribute partialScore="-0.3" >
          <SimplePredicate field="humidity" operator="lessThan" value="30"/>
        </Attribute>
        <Attribute partialScore="-0.6" >
          <SimplePredicate field="humidity" operator="greaterOrEqual" value="60"/>
        </Attribute>
      </Characteristic>
    </Characteristics>
  </Scorecard>
</PMML>
