To implement the Naive Bayes classifier for Continuous and Categorical data
For Continuous Datatype :
Provide a value for each attribute and then click the ADD button to input these values into the table.
Repeat step 1 until the trained dataset contains a total of 6 rows.
Now, enter a value for each attribute to test the algorithm, and then click the ADD button.
Now, click on the NEXT button to initiate the computation phase for the Naive Bayes model.
Enter the occurrences of 'MALE' and 'FEMALE' from the DATASET to calculate Prior Probabilities, then click SUBMIT.
Now, click on NEXT button to calculate Mean and Variance.
Click on the MEAN and then the VARIANCE button to see the calculated values.
Now, click on the NEXT button to calculate Likelihood Probabilities for each fields.
Input the required data, starting with 'MALE' and then clicking the SUBMIT button, and subsequently for 'FEMALE'. Finally, click NEXT to proceed to the next set.
Now, calculate the Posterior Probabilities by entering the required fields for P(MALE | NEW INSTANCE) and click on the SUBMIT button.
- Click on the 'Prior Probability' tab given on the left side of the page to view the required values.
- Next, click on the 'Likelihood Probability' tab and and observe the necessary values.
Repeat the previous step(10) to calculate the Posterior Probabilities for P(FEMALE | NEW INSTANCE).
After submitting the values, click on the NEXT button to access the final result.
For Categorical Datatype :
Provide a value for each attribute and then click the ADD button to input these values into the table.
Repeat step 1 until the trained dataset contains a total of 6 rows.
Now, enter a value for each attribute to test the algorithm, and then click the ADD button.
Now, click on the NEXT button to initiate the computation phase for the Naive Bayes model.
Enter the occurrences of 'YES' and 'NO' from the DATASET to calculate Prior Probabilities, then click SUBMIT.
Now, click on the NEXT button to calculate Likelihood Probability.
Enter the occurrences of each attribute based on their classes in the 'YES' column of the CALCULATION table, and then click the SUBMIT button.
Repeat step 7 for the 'NO' column and click on the NEXT button.
If, zero values are present for any likelihood probability, the Laplace Smoothing section will appear.
Otherwise, calculate the Posterior Probabilities by entering the required fields for P(YES|NEW INSTANCE) and then click on the SUBMIT button.
- Click on the 'Prior Probability' tab given on the left side of the page to view the required values.
- Next, click on the 'Likelihood Probability' tab and and observe the necessary values.
Repeat the above step to find P(NO|NEW INSTANCE).
After submitting their values, click on NEXT button to know the final result.