[SOLVED] CptS 540 Artificial Intelligence Homework 10

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon hw10-vhkgdh.zip (2482.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

 

 

  1. Consider the table of data below, which contains seven examples of the class value Pass based on the features Party, Sleep and Study. Suppose we want to classify the new instance <Party=yes, Sleep=yes, Study=yes> using the Naïve Bayes learning method. Compute the following. Show your work. Note: use the “add 1 / |values|” method if the original P(feature | class) = 0.

 

Party Sleep Study Pass
yes yes no no
yes no yes no
yes no no no
no yes yes yes
no yes no yes
no no yes yes
no no no no

 

  1. Compute the prior probabilities P(Pass=yes) and P(Pass=no).
  2. Compute P(Party | Pass) for all combinations of Party  {yes, no} and Pass  {yes, no}.
  3. Compute P(Sleep | Pass) for all combinations of Sleep  {yes, no} and Pass  {yes, no}.
  4. Compute P(Study | Pass) for all combinations of Study  {yes, no} and Pass  {yes, no}.
  5. Compute P(Pass=yes | Party=yes, Sleep=yes, Study=yes) and P(Pass=no | Party=yes, Sleep=yes, Study=yes).
  6. Which class would Naïve Bayes choose for the new instance?

 

 

1

  1. Train a perceptron on the 7 examples from the table in Problem 1 and then use the trained perceptron to classify the new instance. Specifically,
    1. First, translate the examples (including the Pass class value) according to the mapping: no→ 0, yes → Show a new table of examples using this mapping.
    2. Train the perceptron below by updating the weights according to the perceptron learning rule (slide 34 of Learning lecture). Assume the initial weights are all equal to 1.0, and the learning rate  = 0.25. Consider each example in the order presented in the table in Problem 1 and show the weight updates for each incorrectly-classified example. Continue until the perceptron correctly classifies all the training examples. Show the final perceptron weights. Hint: The perceptron should correctly classify all 7 examples on the 3rd pass through the examples.
    3. How would the trained perceptron classify the new instance <Party=yes, Sleep=yes, Study=yes>? Show your work.

 

 

 

 

  1. CptS 540 Students Only: Put the 7 training examples from the table in Problem 1 into an ARFF file suitable for input to WEKA. Follow the procedure below to run the Naive Bayes classifier.
    1. Download and install WEKA from cs.waikato.ac.nz/ml/weka/downloading.html.
    2. Start WEKA and choose the Explorer mode.
    3. Under the Preprocess tab, choose “Open file…” and load your ARFF file.
    4. Under the Classify tab, choose the “bayes→NaiveBayes” classifier.
    5. Under Test options, choose “Use training set”.
    6. Click Start to run the classifier on your data.
    7. Include your ARFF file and WEKA’s output in your submission.

 

 

2

  • hw10-vhkgdh.zip