PySMILE - ABN algorithm

The engine.
Post Reply
mrogowski
Posts: 1
Joined: Fri Feb 01, 2019 5:28 pm

PySMILE - ABN algorithm

Post by mrogowski »

Hello, is ABN algorithm accessible from PySMILE? Based on documentation (https://support.bayesfusion.com/docs/Wr ... cture.html) it should be, unfortunately I haven't been able to find it in code.

Pysmile version: pysmile-1.4.0-linux-x64-python-3.6-academic
Here is the output from dir(pysmile.learning)

Code: Select all

>> dir(pysmile.learning)
['BayesianSearch',
 'BkKnowledge',
 'DataMatch',
 'DataSet',
 'EM',
 'GreedyThickThinning',
 'NaiveBayes',
 'PC',
 'Pattern',
 'TAN',
 'Validator',
 '__doc__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__']
 
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: PySMILE - ABN algorithm

Post by shooltz[BayesFusion] »

ABN is not accessible from PySMILE. However, ABN is implemented in terms of Bayesian Search - it runs Bayesian Search with fixed background knowledge. Here's how SMILE (C++) creates the background knowledge (cvar is the index of class variable):

Code: Select all

if(feature_selection)
	{
		for(int x = 0; x < ds.GetNumberOfVariables();++x)
			if(x!= cvar)
				bs.bkk.tiers.push_back(make_pair(x,2));
			else
				bs.bkk.tiers.push_back(make_pair(x,1));
	}
	else
	{
		for(int x = 0; x < ds.GetNumberOfVariables();++x)
			if(x!= cvar)
				bs.bkk.forcedArcs.push_back(make_pair(cvar,x));
	}	
Post Reply