[Structure Learning], [Julia], [K2 Graph Search]
Note: This code now supports Julia 1.0!
If this code helped you save time, help me out by clicking the star at the top!
Project for Aero E 504: Decision Making under Uncertainty. Course taught by Professor Peng Wei. This project implements the K2 Algorithm inspired by Cooper's Algorithm proposed in 1992. This code was also inspired by the Mathworks implementation written by Guangdi Li.
Included are the 3 datasets that the K2 Alogorithm had to run on.
- titanic.csv - least number of variables
- whitewine.csv - medium number of varibles
- schoolgrades.csv - largest number of variables
K2 algorithm was able to find a graph structure that fit the data well. In the julia notebook, I include the number of trials that it took to obtain the graph structure.
- Install Julia 1.0
- Go to the Julia command prompt and add the following packages:
>> using Pkg
>> Pkg.add(“BayesNets”)
>> Pkg.add(“IJulia”)
>> Pkg.add(“DataFrames”)
>> Pkg.add(“Discretizers”)
>> Pkg.add(“LightGraphs”)
>> Pkg.add(“Printf”)
>> Pkg.add(“CSV”)
>> Pkg.add(“Random”)
>> Pkg.add(“SpecialFunctions”)
- Download this repository
- Now open jupyter and navigate to the repository
- Open the .ipynb file and make sure that it says julia 1.0.0 in the top right. If not, then you can change the kernel to 1.0 from the kernel tab