write a machine learning algorithm to implement naïve Bayesian Classifier algorithm to classify the given data set. Do not use built-in function for classification and k-fold.
Budget: $10 – $30 USD
Implement naïve Bayesian Classifier algorithm to classify the given data set. Do not use built-in function for classification and k-fold. Need to implement according the document provided and write a report explaining the results. The following are the requirements
1. Separate the entire dataset (613 samples) into training and testing set such as 70% training, 30% testing.
2. For algorithm development, first implement a probability calculation module where a data set with labeled samples (training data) will be used to generate probabilities for each class. For categorical data, the probability of each value given a class can be computed for each attribute value per class using the frequency of values. For continuous values, distributions such as Gaussian is assumed, or Expectation Maximization (EM) method can be utilized. For continuous variables, the parameters of distributions need to be computed.
3. Second implement a classifying module where the program will use naïve Bayesian classifier to classify samples with unknown class assignment.
4. Show your testing results using their accuracy and confusion matrix.
5. Perform k-fold cross validation. Partition the input dataset into K=5 folds using stratified sampling. Your program should train one naïve Bayesian classifier for each fold. The ith run
is trained using all but the ith fold in the dataset, and then evaluated using only the ith fold.
6. For each run, show the accuracy and confusion matrix using the ground truth labels. You
should include the results in your report.
1. Separate the entire dataset (613 samples) into training and testing set such as 70% training, 30% testing.
2. For algorithm development, first implement a probability calculation module where a data set with labeled samples (training data) will be used to generate probabilities for each class. For categorical data, the probability of each value given a class can be computed for each attribute value per class using the frequency of values. For continuous values, distributions such as Gaussian is assumed, or Expectation Maximization (EM) method can be utilized. For continuous variables, the parameters of distributions need to be computed.
3. Second implement a classifying module where the program will use naïve Bayesian classifier to classify samples with unknown class assignment.
4. Show your testing results using their accuracy and confusion matrix.
5. Perform k-fold cross validation. Partition the input dataset into K=5 folds using stratified sampling. Your program should train one naïve Bayesian classifier for each fold. The ith run
is trained using all but the ith fold in the dataset, and then evaluated using only the ith fold.
6. For each run, show the accuracy and confusion matrix using the ground truth labels. You
should include the results in your report.