Skip to content

Latest commit

 

History

History
18 lines (18 loc) · 1.22 KB

README.md

File metadata and controls

18 lines (18 loc) · 1.22 KB

decisiontreepmml

A C# Library for Deploying PMML Decision Tree Model This is a library for deploying and scoring Decision Tree model PMML v4.2 implemented in IBM SPSS Modeler software. With this library you can implement a model in software, export the PMML file and deploy the model in your own application.

How to Use

In your application code, you construct a TreeModel object with path of proper PMML file:

TreeModel model = new TreeModel("E:/Drug.xml");

Then, you should create a dictionary for your data input:

Dictionary<string, object> input = new Dictionary<string, object>(); input.Add("Age", 23);
input.Add("Sex", "F");
input.Add("BP", "HIGH");
input.Add("Cholesterol", "HIGH");
input.Add("Na", 0.792535);
input.Add("K", 0.031258);

And finally with Predict function you can score your input:

model.Predict(input)
Console.WriteLine(model.Predict(input));