NaiveBayes classifier problem

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

NaiveBayes classifier problem

Ally
Hello

I am very new to Weka, so please forgive me if I'm asking a basic question.

I am trying to apply the NaiveBayes classifer on a data which has 2 attributes and 25 instances, and all the values are numeric. The NaiveBayes classifier is greyed out though, I can't perform it. I did a research and as suggested, I applied the NumericToNominal filter to my dataset, then proceeded to apply the NaiveBayes classifier again, and this time it worked, but I think the results I got are not right, as they don't seem to look like those I've seen in tutorials. Also, I see it says that Correctly Classified Instances: 0.  
Can anybody help me understand what went wrong and how can I correct my dataset in order to correctly perform the NaiveBayes classifier? Thanks in advance.

This is how the results look like after I applied the NaiveBayes classifier:
 









Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Eibe Frank-2
Administrator
Use the (supervised or unsupervised) Discretize filter instead. The NumericToNominal filter will give you one nominal attribute value for each numeric attribute value.

Cheers,
Eibe

> On 14 May 2017, at 01:25, Ally <[hidden email]> wrote:
>
> Hello
>
> I am very new to Weka, so please forgive me if I'm asking a basic question.
>
> I am trying to apply the NaiveBayes classifer on a data which has 2
> attributes and 25 instances, and all the values are numeric. The NaiveBayes
> classifier is greyed out though, I can't perform it. I did a research and as
> suggested, I applied the NumericToNominal filter to my dataset, then
> proceeded to apply the NaiveBayes classifier again, and this time it worked,
> but I think the results I got are not right, as they don't seem to look like
> those I've seen in tutorials. Also, I see it says that Correctly Classified
> Instances: 0.  
> Can anybody help me understand what went wrong and how can I correct my
> dataset in order to correctly perform the NaiveBayes classifier? Thanks in
> advance.
>
> This is how the results look like after I applied the NaiveBayes classifier:
>
> <http://weka.8497.n7.nabble.com/file/n40602/1.png>
>
> <http://weka.8497.n7.nabble.com/file/n40602/2.png>
>
> <http://weka.8497.n7.nabble.com/file/n40602/3.jpg>
>
> <http://weka.8497.n7.nabble.com/file/n40602/4.png>
>
>
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Ally
I applied the Discretize filter as suggested, but the NaiveBayes classifier is still unavailable for use
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Eibe Frank-2
Administrator
By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.

Cheers,
Eibe

> On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
>
> I applied the Discretize filter as suggested, but the NaiveBayes classifier
> is still unavailable for use
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

andria lan


> By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.

Hi Eibe,

In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes?

Andria
>
> Cheers,
> Eibe
>
> > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> >
> > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > is still unavailable for use
> >
> >
> >
> > --
> > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > Sent from the WEKA mailing list archive at Nabble.com.
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Ally
In reply to this post by Eibe Frank-2
Do you mean I should set the ignoreClass to True in the Discretize filter pop-up?
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

andria lan
In reply to this post by Eibe Frank-2


> By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.
>
Hi Eibe,

In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes? Is there any parameter required to be modified?

Andria


> Cheers,
> Eibe
>
> > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> >
> > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > is still unavailable for use
> >
> >
> >
> > --
> > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > Sent from the WEKA mailing list archive at Nabble.com.
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Eibe Frank-2
Administrator
You need to discretize the class attribute first, even if you use the FilteredClassifier. The FilteredClassifier won’t touch the class attribute.

Cheers,
Eibe

> On 16/05/2017, at 6:25 AM, Andria Lan <[hidden email]> wrote:
>
>
> > By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.
> >
> Hi Eibe,
>
> In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes? Is there any parameter required to be modified?
>
> Andria
>
>
>
> > Cheers,
> > Eibe
> >
> > > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> > >
> > > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > > is still unavailable for use
> > >
> > >
> > >
> > > --
> > > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > > Sent from the WEKA mailing list archive at Nabble.com.
> > > _______________________________________________
> > > Wekalist mailing list
> > > Send posts to: [hidden email]
> > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

andria lan


You need to discretize the class attribute first, even if you use the FilteredClassifier. The FilteredClassifier won’t touch the class attribute.

Do you recommend the following steps in order to allow NaiveBayes handelling both numeric attribuets, and numeric class attribute:

1- apply the supervised version of the "Discretiz" filter (from the preprocess panel where No class is selected at the very early stage.
2- apply "FilteredClassifier" in conjunction with "NaiveBayes" and supervised version of the "Discretiz" filter. 

Do you recommend the above steps? Are they the correct ones? Knowing that with cpu data, even when selecting the No class option, the supervised version of the "Discretiz" filter still not active. 

Could you please declare the exact *steps* do classify numeric dataset (attribuets, and class attribute) using NaiveBayes?

Thanks in advance. 
Andria


I tried to select "Frequency-based Approaches" first, but it is still not active. 

Cheers,
Eibe

> On 16/05/2017, at 6:25 AM, Andria Lan <[hidden email]> wrote:
>
>
> > By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.
> >
> Hi Eibe,
>
> In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes? Is there any parameter required to be modified?
>
> Andria
>
>
>
> > Cheers,
> > Eibe
> >
> > > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> > >
> > > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > > is still unavailable for use
> > >
> > >
> > >
> > > --
> > > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > > Sent from the WEKA mailing list archive at Nabble.com.
> > > _______________________________________________
> > > Wekalist mailing list
> > > Send posts to: [hidden email]
> > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Eibe Frank-2
Administrator
Use the *unsupervised* filter in Step 1.

Cheers,
Eibe

> On 17/05/2017, at 3:12 PM, Andria Lan <[hidden email]> wrote:
>
>
>
> You need to discretize the class attribute first, even if you use the FilteredClassifier. The FilteredClassifier won’t touch the class attribute.
>
> Do you recommend the following steps in order to allow NaiveBayes handelling both numeric attribuets, and numeric class attribute:
>
> 1- apply the supervised version of the "Discretiz" filter (from the preprocess panel where No class is selected at the very early stage.
> 2- apply "FilteredClassifier" in conjunction with "NaiveBayes" and supervised version of the "Discretiz" filter.
>
> Do you recommend the above steps? Are they the correct ones? Knowing that with cpu data, even when selecting the No class option, the supervised version of the "Discretiz" filter still not active.
>
> Could you please declare the exact *steps* do classify numeric dataset (attribuets, and class attribute) using NaiveBayes?
>
> Thanks in advance.
> Andria
>
>
> I tried to select "Frequency-based Approaches" first, but it is still not active.
>
> Cheers,
> Eibe
>
> > On 16/05/2017, at 6:25 AM, Andria Lan <[hidden email]> wrote:
> >
> >
> > > By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.
> > >
> > Hi Eibe,
> >
> > In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes? Is there any parameter required to be modified?
> >
> > Andria
> >
> >
> >
> > > Cheers,
> > > Eibe
> > >
> > > > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> > > >
> > > > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > > > is still unavailable for use
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > > > Sent from the WEKA mailing list archive at Nabble.com.
> > > > _______________________________________________
> > > > Wekalist mailing list
> > > > Send posts to: [hidden email]
> > > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> > >
> > > _______________________________________________
> > > Wekalist mailing list
> > > Send posts to: [hidden email]
> > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

andria lan
Thanks Eibe, 



Use the *unsupervised* filter in Step 1.

In this case, once doing that, I had an error to due to the fact that NaiveBayes (used in conjuction with both "FilteredClassifier" and the *unsupervised* verios of the "Discretiz" filter) couldn't handel numeric class. I am I on the right direction?

Andria
Cheers,
Eibe

> On 17/05/2017, at 3:12 PM, Andria Lan <[hidden email]> wrote:
>
>
>
> You need to discretize the class attribute first, even if you use the FilteredClassifier. The FilteredClassifier won’t touch the class attribute.
>
> Do you recommend the following steps in order to allow NaiveBayes handelling both numeric attribuets, and numeric class attribute:
>
> 1- apply the supervised version of the "Discretiz" filter (from the preprocess panel where No class is selected at the very early stage.
> 2- apply "FilteredClassifier" in conjunction with "NaiveBayes" and supervised version of the "Discretiz" filter.
>
> Do you recommend the above steps? Are they the correct ones? Knowing that with cpu data, even when selecting the No class option, the supervised version of the "Discretiz" filter still not active.
>
> Could you please declare the exact *steps* do classify numeric dataset (attribuets, and class attribute) using NaiveBayes?
>
> Thanks in advance.
> Andria
>
>
> I tried to select "Frequency-based Approaches" first, but it is still not active.
>
> Cheers,
> Eibe
>
> > On 16/05/2017, at 6:25 AM, Andria Lan <[hidden email]> wrote:
> >
> >
> > > By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.
> > >
> > Hi Eibe,
> >
> > In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes? Is there any parameter required to be modified?
> >
> > Andria
> >
> >
> >
> > > Cheers,
> > > Eibe
> > >
> > > > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> > > >
> > > > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > > > is still unavailable for use
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > > > Sent from the WEKA mailing list archive at Nabble.com.
> > > > _______________________________________________
> > > > Wekalist mailing list
> > > > Send posts to: [hidden email]
> > > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> > >
> > > _______________________________________________
> > > Wekalist mailing list
> > > Send posts to: [hidden email]
> > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Eibe Frank-2
Administrator
As I mentioned earlier, you need to discretize the class as well. You need to set “No class” in the Preprocess panel.

Also, actually, you don’t need to use the FilteredClassifier because NaiveBayes has an option that enables supervised discretisation.

Cheers,
Eibe

> On 17/05/2017, at 3:37 PM, Andria Lan <[hidden email]> wrote:
>
> Thanks Eibe,
>
>
>
> Use the *unsupervised* filter in Step 1.
>
> In this case, once doing that, I had an error to due to the fact that NaiveBayes (used in conjuction with both "FilteredClassifier" and the *unsupervised* verios of the "Discretiz" filter) couldn't handel numeric class. I am I on the right direction?
>
> Andria
> Cheers,
> Eibe
>
> > On 17/05/2017, at 3:12 PM, Andria Lan <[hidden email]> wrote:
> >
> >
> >
> > You need to discretize the class attribute first, even if you use the FilteredClassifier. The FilteredClassifier won’t touch the class attribute.
> >
> > Do you recommend the following steps in order to allow NaiveBayes handelling both numeric attribuets, and numeric class attribute:
> >
> > 1- apply the supervised version of the "Discretiz" filter (from the preprocess panel where No class is selected at the very early stage.
> > 2- apply "FilteredClassifier" in conjunction with "NaiveBayes" and supervised version of the "Discretiz" filter.
> >
> > Do you recommend the above steps? Are they the correct ones? Knowing that with cpu data, even when selecting the No class option, the supervised version of the "Discretiz" filter still not active.
> >
> > Could you please declare the exact *steps* do classify numeric dataset (attribuets, and class attribute) using NaiveBayes?
> >
> > Thanks in advance.
> > Andria
> >
> >
> > I tried to select "Frequency-based Approaches" first, but it is still not active.
> >
> > Cheers,
> > Eibe
> >
> > > On 16/05/2017, at 6:25 AM, Andria Lan <[hidden email]> wrote:
> > >
> > >
> > > > By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.
> > > >
> > > Hi Eibe,
> > >
> > > In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes? Is there any parameter required to be modified?
> > >
> > > Andria
> > >
> > >
> > >
> > > > Cheers,
> > > > Eibe
> > > >
> > > > > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> > > > >
> > > > > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > > > > is still unavailable for use
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > > > > Sent from the WEKA mailing list archive at Nabble.com.
> > > > > _______________________________________________
> > > > > Wekalist mailing list
> > > > > Send posts to: [hidden email]
> > > > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> > > >
> > > > _______________________________________________
> > > > Wekalist mailing list
> > > > Send posts to: [hidden email]
> > > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> > >
> > > _______________________________________________
> > > Wekalist mailing list
> > > Send posts to: [hidden email]
> > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

andria lan
That's right, I have tried it, and it worked correctly without both FilteredClassifier and the supervised version of the Discretiz filter. 
Thanks a lot.

Andria


On Wed, May 17, 2017 at 11:39 AM, Eibe Frank <[hidden email]> wrote:
As I mentioned earlier, you need to discretize the class as well. You need to set “No class” in the Preprocess panel.

Also, actually, you don’t need to use the FilteredClassifier because NaiveBayes has an option that enables supervised discretisation.

Cheers,
Eibe

> On 17/05/2017, at 3:37 PM, Andria Lan <[hidden email]> wrote:
>
> Thanks Eibe,
>
>
>
> Use the *unsupervised* filter in Step 1.
>
> In this case, once doing that, I had an error to due to the fact that NaiveBayes (used in conjuction with both "FilteredClassifier" and the *unsupervised* verios of the "Discretiz" filter) couldn't handel numeric class. I am I on the right direction?
>
> Andria
> Cheers,
> Eibe
>
> > On 17/05/2017, at 3:12 PM, Andria Lan <[hidden email]> wrote:
> >
> >
> >
> > You need to discretize the class attribute first, even if you use the FilteredClassifier. The FilteredClassifier won’t touch the class attribute.
> >
> > Do you recommend the following steps in order to allow NaiveBayes handelling both numeric attribuets, and numeric class attribute:
> >
> > 1- apply the supervised version of the "Discretiz" filter (from the preprocess panel where No class is selected at the very early stage.
> > 2- apply "FilteredClassifier" in conjunction with "NaiveBayes" and supervised version of the "Discretiz" filter.
> >
> > Do you recommend the above steps? Are they the correct ones? Knowing that with cpu data, even when selecting the No class option, the supervised version of the "Discretiz" filter still not active.
> >
> > Could you please declare the exact *steps* do classify numeric dataset (attribuets, and class attribute) using NaiveBayes?
> >
> > Thanks in advance.
> > Andria
> >
> >
> > I tried to select "Frequency-based Approaches" first, but it is still not active.
> >
> > Cheers,
> > Eibe
> >
> > > On 16/05/2017, at 6:25 AM, Andria Lan <[hidden email]> wrote:
> > >
> > >
> > > > By default, the Discretize filters will not modify the class attribute, which needs to be nominal to apply NaiveBayes. You need to choose "No class" in the Preprocess panel (in the pop-up menu just above the histogram) and then apply the filter.
> > > >
> > > Hi Eibe,
> > >
> > > In this case, how to apply the Discretize filter in conjunction with FilteredClassifier and NaiveBayes? Is there any parameter required to be modified?
> > >
> > > Andria
> > >
> > >
> > >
> > > > Cheers,
> > > > Eibe
> > > >
> > > > > On 15 May 2017, at 02:44, Ally <[hidden email]> wrote:
> > > > >
> > > > > I applied the Discretize filter as suggested, but the NaiveBayes classifier
> > > > > is still unavailable for use
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40608.html
> > > > > Sent from the WEKA mailing list archive at Nabble.com.
> > > > > _______________________________________________
> > > > > Wekalist mailing list
> > > > > Send posts to: [hidden email]
> > > > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> > > >
> > > > _______________________________________________
> > > > Wekalist mailing list
> > > > Send posts to: [hidden email]
> > > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> > >
> > > _______________________________________________
> > > Wekalist mailing list
> > > Send posts to: [hidden email]
> > > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> >
> > _______________________________________________
> > Wekalist mailing list
> > Send posts to: [hidden email]
> > List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> > List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Ally
In reply to this post by Eibe Frank-2
I did everything as suggested: selected "No class" and then applied the Discretize filter to my dataset, then proceeded to apply the NaiveBayes classifier, and I got the following results. Something still doesn't look right, I guess...  What else should I do?







Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

Eibe Frank-2
Administrator
You may want to try only discretising the target attribute (“Class”) in the Preprocess panel and leave the other attributes as numeric so that they are processed as numeric attributes by NaiveBayes.

Also, you may want to reduce the number of bins in the discretisation from 10 so that you get more data per bin.

You should consider taking the WEKA MOOCs at http://weka.waikato.ac.nz. I think they would help you a lot.

Cheers,
Eibe

> On 17/05/2017, at 11:02 PM, Ally <[hidden email]> wrote:
>
> I did everything as suggested: selected "No class" and then applied the
> Discretize filter to my dataset, then proceeded to apply the NaiveBayes
> classifier, and I got the following results. Something still doesn't look
> right, I guess...  What else should I do?
>
> <http://weka.8497.n7.nabble.com/file/n40650/1.jpg>
>
> <http://weka.8497.n7.nabble.com/file/n40650/2.jpg>
>
> <http://weka.8497.n7.nabble.com/file/n40650/3.jpg>
>
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40650.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: NaiveBayes classifier problem

andria lan



You may want to try only discretising the target attribute (“Class”) in the Preprocess panel and leave the other attributes as numeric so that they are processed as numeric attributes by NaiveBayes.

Actually, this is what I did :-). Thanks. 

Also, you may want to reduce the number of bins in the discretisation from 10 so that you get more data per bin.

You should consider taking the WEKA MOOCs at http://weka.waikato.ac.nz. I think they would help you a lot.


I will consider that. 

Cheers, 
Andria 
Cheers,
Eibe

> On 17/05/2017, at 11:02 PM, Ally <[hidden email]> wrote:
>
> I did everything as suggested: selected "No class" and then applied the
> Discretize filter to my dataset, then proceeded to apply the NaiveBayes
> classifier, and I got the following results. Something still doesn't look
> right, I guess...  What else should I do?
>
> <http://weka.8497.n7.nabble.com/file/n40650/1.jpg>
>
> <http://weka.8497.n7.nabble.com/file/n40650/2.jpg>
>
> <http://weka.8497.n7.nabble.com/file/n40650/3.jpg>
>
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/NaiveBayes-classifier-problem-tp40602p40650.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html