Thank you @Jeff Erlich for your suggestion to post my question on discourse. I would like to say to the Julia community here, I have posted a question(In the link) and have one more block regarding this https://julialang.slack.com/archives/C6821M4KE/p1623076255061000 issue.
I have a family of DAG saved in the path. This time I have 3 of them named Graph_…lg (In Screenshot)
. I wrote some code to calculate AIC for each of the graphs as
# Upload the data. inputFile = open_dialog("Select data file from Input data for BN") NameOfData = basename(inputFile) data = CSV.read(inputFile,DataFrame); # Upload the graph obtained from K2 inputGraph = open_dialog("Select Graph from Auxiliry file") NameOfGraph = basename(inputGraph) Graph = loadgraph(NameOfGraph); bn5 = fit(DiscreteBayesNet, data, (Graph)); LogL = logpdf(bn5, data); M, N = size(data) k = N; AIC = 2k-2LogL
(I wanted to attach some of my graph and test data but I don’t know how to attach files in discourse. If someone interested try please feel free to ask.). Since it is a manual process, the user has to select graphs each time to see their AIC score. I want to loop the process So that graph having the best AIC stay and the rest to be deleted automatically. Is it possible to in Julia or am I being unnecessarily too much ambitious? Please suggest me a way forward. In a later case, what can I do at least to identify the best graph from the family of graphs automatically based on their AIC calculated? Thank you very much in advance for taking the time to write.
Best Regards - Ashwani