Strange result from Naive Bayes classifier

pupu
pupu New Altair Community Member
edited November 5 in Community Q&A
:D Hello,

First of all, thank you so much to contribute this great DM tool ... you, guys, are so great
I'm new to DM .. and try using RM .. I'm trying to use Naive Bayes to predict whether new customer with a particular profile will/will not buy the product. I have set up the model like this ..
<operator name="Root" class="Process" expanded="yes">
    <operator name="TrainingSet" class="DatabaseExampleSource">
        <parameter key="database_url" value="jdbc:mysql://localhost:3306/insurance"/>
        <parameter key="username" value="xxx"/>
        <parameter key="password" value="xxx"/>
        <parameter key="query" value="select * from customer;"/>
        <parameter key="label_attribute" value="CARAVAN"/>
        <parameter key="classes" value="buy not_buy"/>
    </operator>
    <operator name="NaiveBayes" class="NaiveBayes">
    </operator>
    <operator name="TestSet" class="DatabaseExampleSource">
        <parameter key="database_url" value="jdbc:mysql://localhost:3306/insurance"/>
        <parameter key="username" value="xxx"/>
        <parameter key="password" value="xxx"/>
        <parameter key="query" value="select * from customer_eval;"/>
        <parameter key="label_attribute" value="CARAVAN"/>
        <parameter key="classes" value="buy not_buy"/>
    </operator>
    <operator name="ModelApplier" class="ModelApplier">
        <list key="application_parameters">
        </list>
    </operator>
</operator>
It works without error but in data view field: confidence(buy) and confidence(not_buy) return '?' as a result for each data record ..

Can anybody give me any clues to my error?

Thank you so much
Pupu.
Tagged:

Answers

  • haddock
    haddock New Altair Community Member
    Hi there,

    Firstly welcome to the dataminers' asylum! On your prob what happens if you apply the model on the training set, do you still get a row of ?'s in the prediction columns? Just disable your second database call to check it out. Make sure to tick "keep example set" in the learner. 

    ? usually represents a missing value, so I'm pondering what got learnt.. The setup looks fine so something murky is going on. I take it you've checked the training set and such.

    PS. Don't want to sound like the dreaded Thought Police, but this is probably a problems/support type of question.
  • pupu
    pupu New Altair Community Member
    Hi Haddock  :),

    Thank you for your quick consult and sorry to post in the wrong category.
    I will copy my question and your reply to problem/support category

    Thanks to correct me ... actually, i'm glad you tell me that  :)

    Pupu.
  • Sam98
    Sam98 New Altair Community Member
    hi ,
    try to use weka naive byes
    even if it gives u a warning
    just use it