|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
changing attribute selection algorithmhi forum,
as i know J48 algorithm selects extending node according Gain Ratio. i just wanted to change this algorithm, e.g randomize att. selection. i think i have to change weka code, in GainRatioAttributeEval class? am i right? thanks shilan |
|
|
Re: changing attribute selection algorithm> as i know J48 algorithm selects extending node according Gain Ratio. i just
> wanted to change this algorithm, e.g randomize att. selection. > i think i have to change weka code, in GainRatioAttributeEval class? am i > right? No, that evaluation class is only for the attribute selection package. J48 relevant classes are found in package weka.classifiers.trees.j48. >From a quick look at the code, the C45Split class should be the one that you're after (used by the C45ModelSelection class, which gets instantiated in J48's buildClassifier method). Cheers, Peter -- Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ http://www.cs.waikato.ac.nz/~fracpete/ Ph. +64 (7) 858-5174 _______________________________________________ Wekalist mailing list Send posts to: Wekalist@... List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html |
|
|
Re: changing attribute selection algorithmthis means that by choosing j48 in classifier tab, selecting an attributeSelection like RandomOne in preprocess tab would be useless?
|
|
|
Re: changing attribute selection algorithm
|
|
|
Re: changing attribute selection algorithmPlease no top-posting, see mailing list etiquette why
(http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html). > this means that by choosing j48 in classifier tab, selecting an > attributeSelection like RandomOne in preprocess tab would be useless? Different tabs, different functionality. They're independent from each other. Cheers, Peter -- Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ http://www.cs.waikato.ac.nz/~fracpete/ Ph. +64 (7) 858-5174 _______________________________________________ Wekalist mailing list Send posts to: Wekalist@... List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html |
|
|
Re: changing attribute selection algorithm>> i've found this line,
>> minResult = currentModel[i].gainRatio(); at C45ModelSelection line 162 >> i think this is the line that should be modified to gain new algorithm for >> spiliting a node, e.g infoGain() instead of gainRatio(). am i right? >> but strangely when i use something like this getRandomDouble() instead of >> gainRatio(), and i repeat the test, i get same result for each try!! >> although i think it should be different each time! >> >> any idea please? Did you check with a debugger whether the modified code was actually used and a different attribute chosen? Cheers, Peter -- Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ http://www.cs.waikato.ac.nz/~fracpete/ Ph. +64 (7) 858-5174 _______________________________________________ Wekalist mailing list Send posts to: Wekalist@... List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html |
|
|
Re: changing attribute selection algorithmit wasn't really top-posting. i just edited my previous post!
i checked the tree size, it changed with subsituing infoGain() ! but for getRandom(), weired! i don't get random result!
|
|
|
Re: changing attribute selection algorithm2009/11/2 shiloon <kalhor@...>
If I remember correct, Weka uses a random seed. With other words, if you dont alter the random seed each time you restart the main process, the random values you get will follow the same sequence.
-- Thomas Debray | Theoretical Epidemiology | Julius Center | Stratenum 6.131 | University Medical Center Utrecht | P.O.Box 85500 | 3508 GA Utrecht | The Netherlands | www.juliuscenter.nl | www.thomasdebray.be | www.netstorm.be _______________________________________________ Wekalist mailing list Send posts to: Wekalist@... List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html |
| Free embeddable forum powered by Nabble | Forum Help |