479 views
3 3 votes

Here is an example of training a model using the Naïve Bayes classifier on the Glass dataset(from UCI). The objective is to predict the type of glass based on the 9 parameters. The metric used to understand the classification result are confusion matrix and classification report.

The program is available here

Few Observations/ Questions

  1. By Varying the ‘random_state’ value inside the function train_test_split, we can observe different accuracy values? Is the behavior correct?
  2. The StratfiedShuffle method of  train_test_split also produces random results on the every run. Is there a bug with Naïve Bayes classifier implementation?

 

Please log in or register to answer this question.

Related questions

2 2 votes
1 answers 1 answer
6.6k
6.6k views
tofighi asked Aug 10, 2020
6,577 views
We have data on 1000 pieces of fruit. The fruit being a Banana, Orange or some Other fruit and imagine we know 3 features of each fruit, whether it’s long or not, sweet o...
2 2 votes
1 answers 1 answer
4.9k
4.9k views
tofighi asked Jun 26, 2019
4,859 views
We want to use Naive Bayes for tagging documents. It is a classification task that we want to assign a class (tag) to each string. We currently have two tags: Sport and N...
4 4 votes
1 answers 1 answer
7.6k
7.6k views
tofighi asked Jun 26, 2019
7,619 views
Suppose, you have given the following dataset where x and y are the 2 features and color Red or Blue is the target variable.a) A new data point $x=1$ and $y=1$ is given. ...
3 3 votes
1 answers 1 answer
7.8k
7.8k views
tofighi asked Feb 3, 2020
7,790 views
How to solve this problem?https://i.imgur.com/8urywpf.jpgQ1) Complete the ? sectionsQ2) Accuracy of system if threshold = 0.5?Q3) Accuracy of system if threshold = 0.95?