Skip to content

yashargorgani/clusterpmml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clusterpmml

A C# Library for Deploying PMML Clutering Model This is a library for deploying and scoring Clutering 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 ClusterModel object with path of proper PMML file:

ClusterModel model = new ClusterModel("E:/K-Means.xml");

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

Dictionary<string, object> input = new Dictionary<string, object>();
input.Add("value", 42.712);
input.Add("pmethod", "CHEQUE");
input.Add("sex", "M");
input.Add("homeown", "NO");
input.Add("income", 27000);
input.Add("age", 46);

And finally DetectCluster function returns you a dictionay with cluster number as key and distance to that cluster center as value:

Dictionary<string, double> cluster = model.DetectCluster(input);

Releases

No releases published

Packages

 
 
 

Languages