[SOLVED] CENG 499 - Homework 4

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (2 votes)

Introduction to Machine Learning   – Naive Bayes, Hidden Markov Models version 1

1 Introduction
In this assignment, you have 2 independent tasks: sentiment analysis using Naive Bayes and evaluation and decoding tasks of Hidden Markov Models. No report is required in this homework. All related files can be downloaded from http://user.ceng.metu.edu.tr/~artun/ceng499/hw4_files.zip.
2 Sentiment Analysis using Naive Bayes
2.1 Dataset
The dataset is created using Twitter US Airline Sentiment dataset. You need to use the version we provided. The examples are some tweets that mention some airline firms in US. They are labeled as negative, neutral, and positive and given as plain text files in hw4_data/sentiment.
2.2 Background 2.2.1 Naive Bayes Let h be our hypothesis which is defined as
h(x) = argmax U
P(y|x),
where y is the label and x is the feature. It basically selects the label that has the highest probability given x. Using the Bayes’ Rule, we can obtain
h(x) = argmax U
= argmax U
= argmax U
P(y|x)
P(x|y)P(y) Bayes’ Rule P(x)
P(x|y)P(y) P(x) does not depend on y;
1

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.