Presentation is loading. Please wait.

Presentation is loading. Please wait.

11 Project, Part 3. Outline Basics of supervised learning using Naïve Bayes (using a simpler example) Features for the project 2.

Similar presentations


Presentation on theme: "11 Project, Part 3. Outline Basics of supervised learning using Naïve Bayes (using a simpler example) Features for the project 2."— Presentation transcript:

1 11 Project, Part 3

2 Outline Basics of supervised learning using Naïve Bayes (using a simpler example) Features for the project 2

3 3 The Weather Problem Training Data

4 Classification—A Two-Step Process Model construction –Each training example (line on *arff file) is assumed to belong to a predefined class, as determined by the class label (the last column on the *arff file) –For probabilistic machine learning algorithms, like Naïve Bayes, the model defines the probability that an instance belongs to a class, given a set of feature values. –One probability for each class, for each combination of feature values. –E.g.: –P(play=yes|outlook=sunny,temp=hot,humidity=high,windy=false) –…! –The probabilities are estimated based on counts in the training data (as we have seen throughout the course) 4

5 Classification—A Two-Step Process Model usage: classifying new instances not in the training data E.g., given an instance with these feature values: outlook=sunny,temp=hot,humidity=high,windy=false Which is more likely? P(play=yes|outlook=sunny,temp=hot,humidity=high,windy=false) > P(play=no|outlook=sunny,temp=hot,humidity=high,windy=false)? Assign the most likely class to a new instance, based on probabilities that were estimated based on counts in the training data. 5

6 Classification—A Two-Step Process Model usage: classifying new instances not in the training data Evaluate: Estimate accuracy of the model –The known label of test sample is compared with the classified result from the model –Accuracy rate is the percentage of test set samples that are correctly classified by the model 6

7 Classification Process (1): Model Construction Training Data Classification Algorithms Classifier (Model) For probabilistic algorithms such as Naïve Bayes, the model defines the probability of each class given each possible combination of feature values; the probabilities are estimated based on counts in the training data. 7

8 Classification Process (2): Use the Model in Prediction Classifier Unseen Data outlook=sunny,temp=hot. humidity=high,windy=false Play? For evaluation, the model’s predicted answers are compared to the gold standard labels in the test data 8

9 9 Features for Semantic Role Labeling (SRL) We are defining features for a constituent C added to the *arff files for target predicate P Start with the features from Part 2 –P itself (the lemma) –P's POS –Type of constituent C is

10 Features for SRL Parse Tree Path: minimal path in the parse tree from P to C 10

11 11 Parse Tree Path Feature: Example 1 S NP VP NP PP The Prep NP with the V NP bit a big dog girl boy Det A N ε Adj A ε Det A N ε Path Feature Value: V ↑ VP ↑ S ↓ NP

12 12 Parse Tree Path Feature: Example 2 S NP VP NP PP The Prep NP with the V NP bit a big dog girl boy Det A N ε Adj A ε Det A N ε Path Feature Value: V ↑ VP ↑ S ↓ NP ↓ PP ↓ NP

13 13 Features for SRL Position: Does C precede or follow P in the sentence? Voice: Is P in the active or passive voice? Head word of C

14 14 Head Word Feature Example There are standard syntactic rules for determining which word in a phrase is the head. (You come up with specific rules. They don’t have to be perfect; just reasonable) S NP VP NP PP The Prep NP with the V NP bit a big dog girl boy Det A N ε Adj A ε Det A N ε Head Word: dog

15 15 Example of all Features S NP VP NP PP The Prep NP with the V NP bit a big dog girl boy Det A N ε Adj A ε Det A N ε Phrase Type Parse Path PositionVoiceHead word PP’s POS NPV↑VP↑S↓NPprecedeactivedogbit V


Download ppt "11 Project, Part 3. Outline Basics of supervised learning using Naïve Bayes (using a simpler example) Features for the project 2."

Similar presentations


Ads by Google