Giter Site home page Giter Site logo

ziyaddhuka / learning-algorithms-in-bayesian-network Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 11.13 MB

Implementation of FOD-learn (fully observed data), Expectation Maximisation(Partially Observed Data) and Latent Variable Learning in Bayesian Network

Python 100.00%
bayesian-learning bayesian-inference python3 expectation-maximization network-learning

learning-algorithms-in-bayesian-network's Introduction

# If you are getting errors or not getting the output in PART 1 then try PART 2

# -------------PART 1-------------
> pip install -r requirements.txt
## Run the main.py file with following as arguments 
## uai file 
## task id (1-fod learn, 2-pod learn, 3-mixture model)
## train_file_path
## test_file_path
## k value if task id = 3

for e.g.
> python main.py hw5-data/dataset1/1.uai 2 hw5-data/dataset1/train-p-1.txt hw5-data/dataset1/test.txt
> python main.py hw5-data/dataset1/1.uai 3 hw5-data/dataset1/train-f-1.txt hw5-data/dataset1/test.txt 4





# -------------PART 2-------------
# Steps to run the code... commands are tested in linux.. you can apply alternative commands for windows/MacOS
## Step 1 creating a virtual environment to run the code so that it does not conflicts with other instaled packages on the machine
> python3 -m venv my_env
## Step 2 if the above gives error then make sure your python version is 3.6 or above and install the venv package. If no error move to Step 3
	### for linux and MacOS
	> python3 -m pip install --user virtualenv
	### for windows
	> py -m pip install --user virtualenv

## Step 3 activate the environment
> source my_env/bin/activate


## Step 2 use requirements.txt file to install required packages
> pip install -r requirements.txt

## once done use the part 1 commands to run the output


### once done with grading of the code you can deactivate the environment and delete it
> deactivate
> rm -r my_env

learning-algorithms-in-bayesian-network's People

Contributors

ziyaddhuka avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.