I've been trying different learning algorithms in pysmile. But I have some questions regarding the available options.
Is Essential Graph Search incorporated in pysmile? I doesn't seem to be available.
dir(pysmile.learning)
['__doc__',
'__name__',
'__package__',
'bayesian_search',
'bk_knowledge',
'data_match',
'dataset',
'em',
'greedy_thick_thinning',
'naive_bayes',
'pattern',
'pc',
'tan',
'validator']
While bayesian_search provides the option to set to a maximum run time "set_max_search_time". This option isn't available in "pc". Is there a way to limit the runtime of this search algorithm?
pysmile - learning
-
- Site Admin
- Posts: 1422
- Joined: Mon Nov 26, 2007 5:51 pm
Re: pysmile - learning
Essential Search is not available in SMILE Wrappers. It's only accessible from C++ at this point.
It's the same with PC's max search time; it's a C++ only feature.
It's the same with PC's max search time; it's a C++ only feature.
Re: pysmile - learning
Thanks for the explenation.
I have an additional question regarding match_network() and validator(). I've been trying to test this using one of the older examples available: https://dslpitt.org/genie/wiki/File:Net_tut_5.xdsl
with the data in a datafile: Net_tut_5.txt
However I keep getting an error during the data_matching which is not clear to me.
Are there specific rules for the headers in the datafile and the node_ids in the network when using match_network() and validator()? Or can I use any word I would like?
I have an additional question regarding match_network() and validator(). I've been trying to test this using one of the older examples available: https://dslpitt.org/genie/wiki/File:Net_tut_5.xdsl
with the data in a datafile: Net_tut_5.txt
- A B C
t t t
t f f
f t f
f f f
t t t
t f t
f t f
f f t
Code: Select all
import pysmile
pysmile.license(...)
# read dataset
Dataset = pysmile.learning.dataset()
Dataset.read_file("Net_tut_5.txt")
# open BBN
Net = pysmile.network()
Net.read_file("Net_tut_5.xdsl")
# create data_match
Matched_List = Dataset.match_network(Net)
# validate network
Validation = pysmile.learning.validator(Net,Dataset,Matched_List)
Do you have any idea what I do wrong?ValueError: learning.dataset.match_network raised exception!
errno = -4
Are there specific rules for the headers in the datafile and the node_ids in the network when using match_network() and validator()? Or can I use any word I would like?
-
- Site Admin
- Posts: 61
- Joined: Mon Nov 06, 2017 6:41 pm
Re: pysmile - learning
I'm assuming, that your Dataset isn't corresponding with Network.
Net_tut_5.xdsl has states named State0/State1 instead of t/f from Dataset.
Net_tut_5.xdsl has states named State0/State1 instead of t/f from Dataset.