smanicka has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

i'm trying to use AI::DecisionTree http://search.cpan.org/~kwilliams/AI-DecisionTree-0.09/DecisionTree.pm.My data throws an error saying that it is noisy - so I want to set the noisemode to select best

here is the section from the documentation

new(...parameters...)

Creates a new decision tree object and returns it. Accepts the following parameters:

noise_mode

Controls the behavior of the train() method when "noisy" data is encountered. Here "noisy" means that two or more training instances contradict each other, such that they have identical attributes but different results.

If noise_mode is set to fatal (the default), the train() method will throw an exception (die). If noise_mode is set to pick_best, the most frequent result at each noisy node will be selected.

Could someone show me the exact declaration to do this?

2) Also I'm trying to install the graphviz module inorder to get my drawing output - i am on activestate perl 5.10 on windows XP.i tried to download the module out of CPAN since it is not available in ppm.I have already installed graphviz - it fails make saying that it cannot find "dot.exe".Any help installing this module would be greatly appreciated.

Thanks
  • Comment on 2 questions with regard to ai::decisiontrees

Replies are listed 'Best First'.
Re: 2 questions with regard to ai::decisiontrees
by Corion (Patriarch) on Apr 05, 2010 at 14:37 UTC

    For setting the noise_mode I would imagine that you pass in an option/value pair to the constructor:

    ... noise_mode => 'pick_best', ...

    If the module says it can't find dot.exe then maybe you should make sure that dot.exe can be found. Where does it live on your harddrive(s)? If it's not located in a directory listed in $ENV{PATH}, either add the appropriate directory to $ENV{PATH} or tell Makefile.PL about where to find dot.exe, likely by reading the source code of Makefile.PL and likely by modifying it to suit your situation.

Re: 2 questions with regard to ai::decisiontrees
by smanicka (Scribe) on Apr 05, 2010 at 14:48 UTC

    i did that and all it gives me as output is

    Decision Rules

    ================================================

    -> 'Yes'

    Nothing else

    and incase anyone would like to see what i have in my code - its on my scratchpad

    Thanks

      Maybe you want to show us how you did "all that", and how you produced that output? Maybe you can whittle down your training set to something small and self contained, so we can try to reproduce your findings? If you make it easy for us to help you better, you're more likely to get more and better help in return.