ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-ai
perl-ai
how to do feature selection
by Jianmin WU other posts by this author
May 19 2007 5:43AM messages near this date
how to use the function of "feature selection" under AI::Categorizer | Re: how to do feature selection
hi, buddies,

I am not sure if i am in the right place. :-)

I am a fresh man to the perl and perl AI module.

I am trying to do the NaiveBayes experiments with the help of code demo.pl in
example of the module of AI::Categorizer.
Now I am confused about how to do the feature selection.

The documents say that KnowledgeSet::load( ) will do feature selection and
read the corpus at the same time. So, I change the construction of
KnowledgeSet in
demo.pl from
my $k = AI::Categorizer::KnowledgeSet-> new( verbose => 1 );
$k-> load( collection => $training )
to
my $k = AI::Categorizer::KnowledgeSet-> new( verbose => 1 , features_kept =
5000 );
$k-> load( collection => $training )

Then I re-run the code with expection to keep the top 5000 features with
high Document Frequency.
But it seems that there is no difference as before.  do i misunderstand any
point ?

And also,  is there any smoothing method implemented in
AI::Categorizer::Learner::NaiveBayes ?

Thanks for your attention

Jianmin
Thread:
Jianmin WU
Alan Gibson

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved