Question: Ive been asked to implement a naive bayes classifier on this data to determine the true positive, false negative, false positive and true negative of

Ive been asked to implement a naive bayes classifier on this data to determine the true positive, false negative, false positive and true negative of the training and the test.

The two files training and test consist of data looking like this.

+1 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 -1 1:2 2:2 3:1 4:1 5:2 6:2 7:1 8:2 9:1 +1 1:2 2:2 3:2 4:1 5:2 6:3 7:2 8:3 9:1 -1 1:1 2:1 3:2 4:1 5:1 6:1 7:1 8:3 9:2 +1 1:1 2:1 3:3 4:2 5:1 6:3 7:2 8:4 9:1 -1 1:2 2:1 3:4 4:2 5:2 6:3 7:1 8:1 9:2 -1 1:2 2:2 3:5 4:1 5:2 6:1 7:2 8:1 9:1 

Ive been asked to implement a naive bayes classifier on this data

to determine the true positive, false negative, false positive and true negative

How can I implement naive-bayes to find out the true positives, false negatives... etc?

I've already completely parsed and stored the data into a vector of structs.

Step 1 (20 points). The classification framework should be able to parse training and test files and load these datasets into memory. We use the following data format in this assignment. For training and test data files, each line contains an instance, which takes the following format: (label) (index1): valuel) (index2): (value2) Step 1 (20 points). The classification framework should be able to parse training and test files and load these datasets into memory. We use the following data format in this assignment. For training and test data files, each line contains an instance, which takes the following format: (label) (index1): valuel) (index2): (value2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!