Hi I've a question re Naive Bayes classifier and error I'm seeing

Ado_on_the_WingAdo_on_the_Wing Member Posts: 2 Newbie
I hoped to run a Naive Bayes classifier on my simple dataset. I have 260 people records. There are ten independent attributes (about how people feel in wellness terms) and they're answered in simple binary form (unhappy = 1, otherwise =0) I have applied a class label to each of them, as in are they overall likely to be good next year or not.  It's telling me the numerical label is not supported...  Any help please? I'm only a newbie to this Community and also new to RapidMiner.. Thank you

Answers

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi!

    Naive Bayes in RapidMiner can only do classification. This means that your target (or label) attribute needs to be nominal (in this case binominal, having two possible nominal values). You can use Numerical to Binominal to change your attributes to the correct format. Or you could use Generate Attributes to change the numbers to the actual meaning:
    if([attribute] == 1, "unhappy", "otherwise")

    Naive Bayes will then work with the binominal label correctly.

    Regards,
    Balázs
  • Ado_on_the_WingAdo_on_the_Wing Member Posts: 2 Newbie
    Thank you for this and apologies for my delayed response. I'll revert asap with how I get on.
Sign In or Register to comment.