Im trying to run a Netlogo model where turtle behavior is dependent on the probabilities from a ML model like Decision tree. This rule set is supplied in the form of a PMML file. Is there a way to do this using python extension ?
Update
Im now able to parse and create a rule list. However im having trouble accessing the rules list generated with in py:run (...) block outside i the Netlogo code. I tried changing read_pmml to t-report and then access as py:runresult without any success
I have a workaround to export as a csv file and import again in netlogo code but i feel it is not efficient
example code:
to read_pmml
(py:run
"import csv"
"import xml.etree.ElementTree as ET"
"tree = ET.parse('mytest.pmml')"
## reminder of the code
"print (rule_list)"
)
end