Re: How to use InputMappedClassifier with a Bayesian Network
Peter Reutemann <[email protected]> Fri, 15 Dec 2023 08:52:48 +1300
| Newsgroups | gmane.comp.ai.weka |
|---|---|
| Message-ID | <CAHoQ12+XCE5WTLbmTKLWga5w=vKZT46vwFaR=kLQ_tYRjc+2gQ@mail.gmail.com> |
> Can someone explain to me how I am supposed to use the InputMappedClassifier to validate a Bayesian Network using an external dataset? > > It seems like it cannot map the continuous attributes in the testset onto the now discretized equivalents in the Bayesian Network. > However, I cannot find how to put the correct mapping in. > > > > Also, as the discretization is done automaticly by WEKA, I cannot simply discretize the test set myself. Was your classifier wrapped in the InputMappedClassifier before you trained it? The BayesNet classifier applies the same discretization filter to data that it is generating predictions for as it was trained on. You don't actually need to discretize the data yourself beforehand. Rule of thumb for Weka is that training and test datasets have to have the *exact* structure: same # attributes, same order of attributes, same type of attributes, same # and order of labels for nominal attributes. That way you can avoid problems further down the track. Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, Hamilton, NZ Mobile +64 22 190 2375 https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/ _______________________________________________ Wekalist mailing list -- [email protected] Send posts to [email protected] To unsubscribe send an email to [email protected] To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html