Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First version of pom.xml and pmml file
- Loading branch information
1 parent
7be22ac
commit 7531fee
Showing
2 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>odm-pmml</groupId> | ||
<artifactId>odm-pmml-xom</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>odm-pmml-xom</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>3.8.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jpmml</groupId> | ||
<artifactId>pmml-evaluator</artifactId> | ||
<version>1.3.5</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
144 changes: 144 additions & 0 deletions
144
odm-pmml-xom/src/main/resources/com/test/neural_insurance.pmml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
<PMML xmlns="http://www.dmg.org/PMML-4_3" version="4.3"> | ||
<Header copyright="DMG.org"/> | ||
<DataDictionary numberOfFields="5"> | ||
<DataField name="gender" optype="categorical" dataType="string"> | ||
<Value value=" female"/> | ||
<Value value=" male"/> | ||
</DataField> | ||
<DataField name="no of claims" optype="categorical" dataType="string"> | ||
<Value value=" 0"/> | ||
<Value value=" 1"/> | ||
<Value value=" 3"/> | ||
<Value value=" &gt; 3"/> | ||
<Value value=" 2"/> | ||
</DataField> | ||
<DataField name="domicile" optype="categorical" dataType="string"> | ||
<Value value="suburban"/> | ||
<Value value=" urban"/> | ||
<Value value=" rural"/> | ||
</DataField> | ||
<DataField name="age of car" optype="continuous" dataType="double"/> | ||
<DataField name="amount of claims" optype="continuous" dataType="integer"/> | ||
</DataDictionary> | ||
<NeuralNetwork modelName="Neural Insurance" functionName="regression" activationFunction="logistic" numberOfLayers="2"> | ||
<MiningSchema> | ||
<MiningField name="gender"/> | ||
<MiningField name="no of claims"/> | ||
<MiningField name="domicile"/> | ||
<MiningField name="age of car"/> | ||
<MiningField name="amount of claims" usageType="target"/> | ||
</MiningSchema> | ||
<NeuralInputs numberOfInputs="10"> | ||
<NeuralInput id="0"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormContinuous field="age of car"> | ||
<LinearNorm orig="0.01" norm="0"/> | ||
<LinearNorm orig="3.07897" norm="0.5"/> | ||
<LinearNorm orig="11.44" norm="1"/> | ||
</NormContinuous> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="1"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="gender" value=" male"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="2"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="no of claims" value=" 0"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="3"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="no of claims" value=" 1"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="4"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="no of claims" value=" 3"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="5"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="no of claims" value=" &gt; 3"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="6"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="no of claims" value=" 2"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="7"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="domicile" value="suburban"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="8"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="domicile" value=" urban"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
<NeuralInput id="9"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormDiscrete field="domicile" value=" rural"/> | ||
</DerivedField> | ||
</NeuralInput> | ||
</NeuralInputs> | ||
<NeuralLayer numberOfNeurons="3"> | ||
<Neuron id="10"> | ||
<Con from="0" weight="-2.08148"/> | ||
<Con from="1" weight="3.69657"/> | ||
<Con from="2" weight="-1.89986"/> | ||
<Con from="3" weight="5.61779"/> | ||
<Con from="4" weight="0.427558"/> | ||
<Con from="5" weight="-1.25971"/> | ||
<Con from="6" weight="-6.55549"/> | ||
<Con from="7" weight="-4.62773"/> | ||
<Con from="8" weight="1.97525"/> | ||
<Con from="9" weight="-1.0962"/> | ||
</Neuron> | ||
<Neuron id="11"> | ||
<Con from="0" weight="-0.698997"/> | ||
<Con from="1" weight="-3.54943"/> | ||
<Con from="2" weight="-3.29632"/> | ||
<Con from="3" weight="-1.20931"/> | ||
<Con from="4" weight="1.00497"/> | ||
<Con from="5" weight="0.033502"/> | ||
<Con from="6" weight="1.12016"/> | ||
<Con from="7" weight="0.523197"/> | ||
<Con from="8" weight="-2.96135"/> | ||
<Con from="9" weight="-0.398626"/> | ||
</Neuron> | ||
<Neuron id="12"> | ||
<Con from="0" weight="0.904057"/> | ||
<Con from="1" weight="1.75084"/> | ||
<Con from="2" weight="2.51658"/> | ||
<Con from="3" weight="-0.151895"/> | ||
<Con from="4" weight="-2.88008"/> | ||
<Con from="5" weight="0.920063"/> | ||
<Con from="6" weight="-3.30742"/> | ||
<Con from="7" weight="-1.72251"/> | ||
<Con from="8" weight="-1.13156"/> | ||
<Con from="9" weight="-0.758563"/> | ||
</Neuron> | ||
</NeuralLayer> | ||
<NeuralLayer numberOfNeurons="1"> | ||
<Neuron id="13"> | ||
<Con from="10" weight="0.76617"/> | ||
<Con from="11" weight="-1.5065"/> | ||
<Con from="12" weight="0.999797"/> | ||
</Neuron> | ||
</NeuralLayer> | ||
<NeuralOutputs numberOfOutputs="1"> | ||
<NeuralOutput outputNeuron="13"> | ||
<DerivedField optype="continuous" dataType="double"> | ||
<NormContinuous field="amount of claims"> | ||
<LinearNorm orig="0" norm="0.1"/> | ||
<LinearNorm orig="1291.68" norm="0.5"/> | ||
<LinearNorm orig="5327.26" norm="0.9"/> | ||
</NormContinuous> | ||
</DerivedField> | ||
</NeuralOutput> | ||
</NeuralOutputs> | ||
</NeuralNetwork> | ||
</PMML> |