GithubHelp home page GithubHelp logo

naivebayes's Introduction

Perceptron

Dr. Rachel Nicholson is a Professor, who lives far away from her university. So, she prefer to work at home and she only comes to her office if she has research meetings with her postgraduate students, or teaching lectures for undergraduate students, or she has both meetings and teaching:

  • The probability for Rachel to have meetings is 70%, the probability of Rachel has lectures is 60%.
  • If Rachel has both meetings and lectures, the probability of Rachel comes to her office is 95%.
  • If Rachel only has meetings (without lectures), the probability of Rachel comes to her office is 75% because she can Skype with her students.
  • If Rachel only has lectures (without meetings), the probability of Rachel comes to her office is 80%.
  • If Rachel has neither meetings nor lectures, there is a only 6% chance that she comes to the office.
  • When Rachel is in her office, half the time her light is off (when she is trying to hide from others to get work done quickly).
  • When she is not in her office, she leaves her light on only 2% of the time since the cleaners come for cleaning.
  • When Rachel is in her office, 80% of the time she logged onto the computer.
  • Because she sometimes work from home, 20% of the time she is not in her office, she is still logged onto the computer.

Requirements

Construct a Bayesian network to represent the above scenario. (Hint: First decide what your domain variables are; these will be your network nodes. Then decide what the causal relationships are between the domain variables and add directed arcs in the network from cause to effect. Finally, you have to add the prior probabilities for nodes without parents, and the conditional probabilities for nodes that have parents.)

Prerequisite

  • Python 3.6 or higher
  • Please keep all the related data files in the same folder (i.e.part2).

Running Steps

  1. Open Terminal console
  2. Go to the project part2 directory
  3. Run command: python NaiveBayes.py spamLabelled.dat spamUnlabelled.dat
  4. An output file (sampleoutput.txt) will be generated in the same project folder. Check it for the result.

naivebayes's People

Contributors

flycat52 avatar

Watchers

James Cloos avatar  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.