On Monday, June 10, 2002, at 01:04 AM, gidon wrote:
> I ran the code from the Synopsis. And I printed the result
> and the result was Yes. But it seems to me that in the test
> case two out of three of the values are those of NO Tennis
> days, so I figured that it should have responded NO.
Well, two out of three are for YES days too. =)
Actually, you can't really tell from the given training code
what the result should be - it depends on what gets filled in
for the "... repeat for several more instances" section. There
might be several other instances that give you more information
about how the tree should be constructed. With just two
training instances, it's not going to be able to construct a
very interesting or useful tree.
For a better set of test data, have a peek inside the 'test.pl' file.
> I also had the following warnings.
>
> Scalar value @count{$_} better written as $count{$_} at
> /usr/local/lib/perl5/site_perl/5.6.1/AI/DecisionTree.pm line 95.
> Use of uninitialized value in numeric le (<=) at
> /usr/local/lib/perl5/site_perl/5.6.1/AI/DecisionTree.pm line 87.
Thanks, the first one is a brain-o that I've just fixed. The
second one was only slightly less stupid, fixed as well.
If I make any other more substantial changes in the next few
days I'll upload these fixes with a new version, or maybe just
release a new version anyway.
-Ken