perl.ai http://www.nntp.perl.org/group/perl.ai/ ... Copyright 1998-2016 perl.org Thu, 25 Aug 2016 03:17:37 +0000 ask@perl.org Re: Hello.hello.hello. by SPAM NO Hi.<br/><br/>I decided to use C# instead of perl. but I still love perl.<br/><br/>Please stopping dumy message to this mailing list. because it is not<br/>related to AI.<br/><br/>10 years...<br/><br/>I really thanks to everyone. http://www.nntp.perl.org/group/perl.ai/2013/04/msg588.html Tue, 30 Apr 2013 11:30:53 +0000 Re: Hello.hello.hello. by SPAM NO I know a bug on AI::Categoryzer. Maybe. it was not fixed. Seriously. <br/>Who use it for data science until now? <br/> <br/>&#xB098;&#xC758; iPhone&#xC5D0;&#xC11C; &#xBCF4;&#xB0C4; <br/> <br/>2013. 4. 26. &#xC624;&#xC804; 5:32 Ben Tucker &lt;ben@btucker.net&gt; &#xC791;&#xC131;: <br/> <br/>&gt; Zombie here. Greetings all! This is bringing back fond memories of doing <br/>&gt; really fun stuff with AI::Categorizer 8 or 9 years ago. <br/>&gt; <br/>&gt; -Ben <br/>&gt; <br/>&gt; <br/>&gt; On Wed, Apr 24, 2013 at 4:14 PM, Mason Loring Bliss &lt;mason@blisses.org&gt;wrote: <br/>&gt; <br/>&gt;&gt; On Wed, Apr 24, 2013 at 01:12:10PM -0700, Jovan Trujillo wrote: <br/>&gt;&gt; <br/>&gt;&gt;&gt; Is there anybody out there? <br/>&gt;&gt; <br/>&gt;&gt; Wow, I&#39;d forgotten I was on this list. <br/>&gt;&gt; <br/>&gt;&gt; I think it qualifies as dead, but your email might rustle up some zombies. <br/>&gt;&gt; <br/>&gt;&gt; -- <br/>&gt;&gt; Mason Loring Bliss (( IF I HAD KNOWN IT WAS HARMLESS <br/>&gt;&gt; mason@blisses.org )) I WOULD HAVE KILLED IT MYSELF. <br/>&gt;&gt; <br/> http://www.nntp.perl.org/group/perl.ai/2013/04/msg587.html Fri, 26 Apr 2013 10:25:02 +0000 Re: Hello.hello.hello. by Richard Jelinek Oh, I&#39;m on this list too. :-o<br/><br/><br/>On Wed, Apr 24, 2013 at 05:23:26PM -0700, Dragon wrote:<br/>&gt; &quot;How do you feel about AIs keeping the conversation going?&quot; ;-)<br/><br/>It&#39;s a shame we haven&#39;t been able to update it for some 5 years, but<br/>actually there&#39;s one AI available - and written in Perl - that could<br/>do it. http://nlp.petamem.com/eng/nlp/chatbot.mpl<br/><br/>However, right now, we&#39;re in update hell: The site has been<br/>ported to a new design and Catalyst, and doesn&#39;t speak anymore to the<br/>new version of the &quot;Discourse Engine&quot; (vulgo: chatbot)...<br/><br/>Stay tuned - for another 5 years or so. ;-) Hope not.<br/><br/>-- <br/> Dipl.-Inf. Univ. Richard C. Jelinek<br/><br/>PetaMem GmbH - www.petamem.com Gesch&auml;ftsf&uuml;hrer: Richard Jelinek<br/>Language Technology - We Mean IT! Sitz der Gesellschaft: F&uuml;rth<br/>2.58921 * 10^8 Mind Units Registergericht: AG F&uuml;rth, HRB-9201<br/> http://www.nntp.perl.org/group/perl.ai/2013/04/msg586.html Thu, 25 Apr 2013 20:33:05 +0000 Re: Hello.hello.hello. by Bennett Todd &gt; &quot;How do you feel about AIs keeping the conversation going?&quot; ;-)<br/><br/>If the AIs remained amusing for any length of time, after I was convinced<br/>that it was real, I&#39;d shift from annoyed to impressed. http://www.nntp.perl.org/group/perl.ai/2013/04/msg585.html Thu, 25 Apr 2013 20:32:57 +0000 Re: Hello.hello.hello. by Ben Tucker Zombie here. Greetings all! This is bringing back fond memories of doing<br/>really fun stuff with AI::Categorizer 8 or 9 years ago.<br/><br/>-Ben<br/><br/><br/>On Wed, Apr 24, 2013 at 4:14 PM, Mason Loring Bliss &lt;mason@blisses.org&gt;wrote:<br/><br/>&gt; On Wed, Apr 24, 2013 at 01:12:10PM -0700, Jovan Trujillo wrote:<br/>&gt;<br/>&gt; &gt; Is there anybody out there?<br/>&gt;<br/>&gt; Wow, I&#39;d forgotten I was on this list.<br/>&gt;<br/>&gt; I think it qualifies as dead, but your email might rustle up some zombies.<br/>&gt;<br/>&gt; --<br/>&gt; Mason Loring Bliss (( IF I HAD KNOWN IT WAS HARMLESS<br/>&gt; mason@blisses.org )) I WOULD HAVE KILLED IT MYSELF.<br/>&gt; http://www.nntp.perl.org/group/perl.ai/2013/04/msg584.html Thu, 25 Apr 2013 20:32:43 +0000 Re: Hello.hello.hello. by Jovan Trujillo Anybody here play with AIML using Perl? Only code I have played with was <br/>program V, an AIML chatbot written in Perl. Is there anything else out <br/>there for working with AIML with Perl? <br/> <br/> <br/>On Wed, Apr 24, 2013 at 5:23 PM, Dragon &lt;jcbdragon@yahoo.com&gt; wrote: <br/> <br/>&gt; &quot;How do you feel about AIs keeping the conversation going?&quot; ;-) <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; ________________________________ <br/>&gt; From: Andri M&ouml;ll &lt;andri@dot.ee&gt; <br/>&gt; To: Mason Loring Bliss &lt;mason@blisses.org&gt; <br/>&gt; Cc: perl-ai@perl.org <br/>&gt; Sent: Wednesday, April 24, 2013 3:39 PM <br/>&gt; Subject: Re: Hello.hello.hello. <br/>&gt; <br/>&gt; <br/>&gt; Well it&#39;s time to write up some AI to keep the conversation going. <br/>&gt; <br/>&gt; A. <br/>&gt; <br/>&gt; On Apr 24, 2013, at 11:14 PM, Mason Loring Bliss &lt;mason@blisses.org&gt; <br/>&gt; wrote: <br/>&gt; <br/>&gt; &gt; On Wed, Apr 24, 2013 at 01:12:10PM -0700, Jovan Trujillo wrote: <br/>&gt; &gt; <br/>&gt; &gt;&gt; Is there anybody out there? <br/>&gt; &gt; <br/>&gt; &gt; Wow, I&#39;d forgotten I was on this list. <br/>&gt; &gt; <br/>&gt; &gt; I think it qualifies as dead, but your email might rustle up some <br/>&gt; zombies. <br/>&gt; &gt; <br/>&gt; &gt; -- <br/>&gt; &gt; Mason Loring Bliss (( IF I HAD KNOWN IT WAS HARMLESS <br/>&gt; &gt; mason@blisses.org )) I WOULD HAVE KILLED IT MYSELF. <br/>&gt; http://www.nntp.perl.org/group/perl.ai/2013/04/msg583.html Thu, 25 Apr 2013 05:58:09 +0000 Re: Hello.hello.hello. by Dragon &quot;How do you feel about AIs keeping the conversation going?&quot; ;-) <br/> <br/> <br/> <br/> <br/>________________________________ <br/> From: Andri M&ouml;ll &lt;andri@dot.ee&gt; <br/>To: Mason Loring Bliss &lt;mason@blisses.org&gt; <br/>Cc: perl-ai@perl.org <br/>Sent: Wednesday, April 24, 2013 3:39 PM <br/>Subject: Re: Hello.hello.hello. <br/> <br/> <br/>Well it&#39;s time to write up some AI to keep the conversation going. <br/> <br/>A. <br/> <br/>On Apr 24, 2013, at 11:14 PM, Mason Loring Bliss &lt;mason@blisses.org&gt; wrote: <br/> <br/>&gt; On Wed, Apr 24, 2013 at 01:12:10PM -0700, Jovan Trujillo wrote: <br/>&gt; <br/>&gt;&gt; Is there anybody out there? <br/>&gt; <br/>&gt; Wow, I&#39;d forgotten I was on this list. <br/>&gt; <br/>&gt; I think it qualifies as dead, but your email might rustle up some zombies. <br/>&gt; <br/>&gt; -- <br/>&gt; Mason Loring Bliss&nbsp; &nbsp; ((&nbsp; &nbsp; IF I HAD KNOWN IT WAS HARMLESS <br/>&gt; mason@blisses.org&nbsp; &nbsp; ))&nbsp; &nbsp; I WOULD HAVE KILLED IT MYSELF. http://www.nntp.perl.org/group/perl.ai/2013/04/msg582.html Thu, 25 Apr 2013 00:23:37 +0000 Re: Hello.hello.hello. by Lucas Tulloch Hello <br/> <br/> <br/>On Thu, Apr 25, 2013 at 6:09 AM, Andri M&ouml;ll &lt;andri@dot.ee&gt; wrote: <br/> <br/>&gt; Well it&#39;s time to write up some AI to keep the conversation going. <br/>&gt; <br/>&gt; A. <br/>&gt; <br/>&gt; On Apr 24, 2013, at 11:14 PM, Mason Loring Bliss &lt;mason@blisses.org&gt; <br/>&gt; wrote: <br/>&gt; <br/>&gt; &gt; On Wed, Apr 24, 2013 at 01:12:10PM -0700, Jovan Trujillo wrote: <br/>&gt; &gt; <br/>&gt; &gt;&gt; Is there anybody out there? <br/>&gt; &gt; <br/>&gt; &gt; Wow, I&#39;d forgotten I was on this list. <br/>&gt; &gt; <br/>&gt; &gt; I think it qualifies as dead, but your email might rustle up some <br/>&gt; zombies. <br/>&gt; &gt; <br/>&gt; &gt; -- <br/>&gt; &gt; Mason Loring Bliss (( IF I HAD KNOWN IT WAS HARMLESS <br/>&gt; &gt; mason@blisses.org )) I WOULD HAVE KILLED IT MYSELF. <br/>&gt; <br/>&gt; http://www.nntp.perl.org/group/perl.ai/2013/04/msg581.html Wed, 24 Apr 2013 20:58:18 +0000 Re: Hello.hello.hello. by =?iso-8859-1?Q?Andri_M=F6ll?= Well it&#39;s time to write up some AI to keep the conversation going.<br/><br/>A.<br/><br/>On Apr 24, 2013, at 11:14 PM, Mason Loring Bliss &lt;mason@blisses.org&gt; wrote:<br/><br/>&gt; On Wed, Apr 24, 2013 at 01:12:10PM -0700, Jovan Trujillo wrote:<br/>&gt; <br/>&gt;&gt; Is there anybody out there?<br/>&gt; <br/>&gt; Wow, I&#39;d forgotten I was on this list.<br/>&gt; <br/>&gt; I think it qualifies as dead, but your email might rustle up some zombies.<br/>&gt; <br/>&gt; -- <br/>&gt; Mason Loring Bliss (( IF I HAD KNOWN IT WAS HARMLESS<br/>&gt; mason@blisses.org )) I WOULD HAVE KILLED IT MYSELF.<br/> http://www.nntp.perl.org/group/perl.ai/2013/04/msg580.html Wed, 24 Apr 2013 20:40:00 +0000 Re: Hello.hello.hello. by Mason Loring Bliss On Wed, Apr 24, 2013 at 01:12:10PM -0700, Jovan Trujillo wrote:<br/><br/>&gt; Is there anybody out there?<br/><br/>Wow, I&#39;d forgotten I was on this list.<br/><br/>I think it qualifies as dead, but your email might rustle up some zombies.<br/><br/>-- <br/>Mason Loring Bliss (( IF I HAD KNOWN IT WAS HARMLESS<br/> mason@blisses.org )) I WOULD HAVE KILLED IT MYSELF.<br/> http://www.nntp.perl.org/group/perl.ai/2013/04/msg579.html Wed, 24 Apr 2013 20:14:23 +0000 Hello.hello.hello. by Jovan Trujillo Is there anybody out there? http://www.nntp.perl.org/group/perl.ai/2013/04/msg578.html Wed, 24 Apr 2013 20:12:21 +0000 ai:categorizer memory usage by Thomas Krichel <br/> Hi, gang, <br/><br/> I sent a message to Ken Williams &lt;kenahoo@gmail.com&gt; but I have no<br/> answer. Maybe some kind soul who has some familiarity with the<br/> matter can have a look at this. I have a script and data at<br/><br/>http://wotan.liu.edu/home/krichel/tmp/ken_williams<br/><br/> I want to sort a set of refused documents for best fit to a set of<br/> accepted documents. For each refused document, I train a set of all<br/> documents except that single refused document, then test the single<br/> refused document against that trained set. Here is my problem: at<br/> each test the memory requirement of the running script seems to<br/> increase. I have tried to free memory as much as I could by<br/> unassigning the hypothesis object, the knowledge set object etc to<br/> know avail, the memory hog slows down my machine to a crawl as the<br/> number of tests conducted goes into the hundreds.<br/><br/> Any hints greatly appreciated! <br/><br/> Cheers,<br/><br/> Thomas Krichel http://openlib.org/home/krichel<br/> RePEc:per:1965-06-05:thomas_krichel<br/> skype: thomaskrichel<br/> http://www.nntp.perl.org/group/perl.ai/2009/07/msg577.html Wed, 15 Jul 2009 01:16:51 +0000 Categorizer::Learner::SVM, scores of categories? by Jiuan-Ru Jennifer Lai Hi,<br/><br/>I used the Categorizer::SVM library for large data classification (great<br/>tool); however, I&#39;m having trouble analyzing the result from the SVM<br/>learner.<br/><br/>- Categories have scores of either 0 or 1, with 1 being that this document<br/>belongs to this category, and 0 otherwise. Are there any scores representing<br/>probabilities or confidence level of belong to certain category other than<br/>these 0, 1 values?<br/>- Suppose this document could belong to 3 possible categories: cat1, cat2,<br/>and cat3. The best_category method simply picks the first category as the<br/>classification decision. If you call, $hypothesis-&gt;categories, the<br/>categories outputed don&#39;t seem to be in the order of probabilities or<br/>confidence level. They seem to be in the fixed order....and whatever listed<br/>first is favored.<br/><br/>I hope someone can clear my confusion on the scores of categories in the<br/>SVM module.<br/><br/>Thank you very much in advance,<br/>Jennifer http://www.nntp.perl.org/group/perl.ai/2008/03/msg576.html Tue, 18 Mar 2008 11:53:43 +0000 yawn cornerstone by Hester Newton Big News For SZSN! Shares Rocket! UP 37.5%<br/><br/>Shandong Zhouyuan Seed and Nursery Co., Ltd (SZSN)<br/>$0.33 UP 37.5%<br/><br/>SZSN new releases show huge expansion and Multi-Million dollar projects.<br/>Share prices rocket! Friday&#39;s trading was strong. Get On SZSN first<br/>thing Monday!<br/><br/>Yes, it is that good. If they have work and family commitments, then<br/>perhaps it is easier to set aside a weekend to see a large number of<br/>bands in one go than go to regular gigs. He was detained by police in<br/>Middlesex on Saturday in connection with failing to attend a court<br/>hearing over alleged drugs offences in Glasgow.<br/><br/>Closest to it in spirit is the Outsider Festival, held at Rothiemuchus,<br/>near Aviemore, with an emphasis on outdoor activities as well as music,<br/>and directly targeted at the older fan. With the likes of the Beastie<br/>Boys, Primal Scream and Bjork headlining, music is still to the fore,<br/>but more established groups dominate the line-up.<br/>Half Day FishingMaybe you guys can take it up on the northern Atlantic<br/>and Pacific coasts, but in the Southeast, a whole day of fishing in this<br/>unbearable summer heat can really wear a fellow out. She&#39;s very active<br/>in an Women help association, fighting for women rights, against<br/>excision.<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/07/msg575.html Sun, 15 Jul 2007 10:04:53 +0000 Add documents to a learner? by Ignacio J. Ortega Lopera It&#39;s possible to add training to a learner? how?<br/><br/>What i try is to reopen a state file, and add new documents to the training<br/>set without reading the entire corpus again..<br/><br/>It&#39;s seems that Algorithm::NativeBayes has a &quot;purge&quot; parameter that seems to<br/>help doing that, it permit add new instances, after a train..<br/><br/>Saludios, Ignacio J. Ortega http://www.nntp.perl.org/group/perl.ai/2007/06/msg574.html Thu, 07 Jun 2007 00:46:14 +0000 Re: Problems trying to predict by Ignacio J. Ortega Lopera Hola Ken:<br/><br/>Many thanks, your advice, did the trick.. nad yes it was when reloading<br/>state from file..<br/><br/>2007/6/7, Ken Williams &lt;ken@mathforum.org&gt;:<br/>&gt;<br/>&gt; Hi Ignacio,<br/>&gt;<br/>&gt; Is this when loading a pre-trained categorizer from a saved file?<br/>&gt; This is a known problem, but I haven&#39;t settled on a good solution.<br/>&gt;<br/>&gt; A simple workaround is to just put:<br/>&gt;<br/>&gt; use Algorithm::NaiveBayes::Model::Frequency;<br/>&gt;<br/>&gt; in the script that&#39;s currently failing.<br/>&gt;<br/>&gt; -Ken<br/>&gt;<br/>&gt;<br/>&gt; On May 30, 2007, at 1:47 PM, Ignacio J. Ortega Lopera wrote:<br/>&gt;<br/>&gt; &gt; i&#39;m getting this:<br/>&gt; &gt;<br/>&gt; &gt; Can&#39;t locate object method &quot;predict&quot; via package<br/>&gt; &gt; &quot;Algorithm::NaiveBayes::Model::<br/>&gt; &gt; Frequency&quot; at<br/>&gt; &gt; /usr/lib/perl5/site_perl/5.8.0/AI/Categorizer/Learner/NaiveBayes.p<br/>&gt; &gt; m line 28.<br/>&gt; &gt;<br/>&gt; &gt; when trying to get hypoteses.. for a new doc....<br/>&gt; &gt;<br/>&gt; &gt; anyone know if this is a silly one?<br/>&gt;<br/>&gt; http://www.nntp.perl.org/group/perl.ai/2007/06/msg573.html Thu, 07 Jun 2007 00:41:42 +0000 Re: Problems trying to predict by Ken Williams Hi Ignacio,<br/><br/>Is this when loading a pre-trained categorizer from a saved file? <br/>This is a known problem, but I haven&#39;t settled on a good solution.<br/><br/>A simple workaround is to just put:<br/><br/> use Algorithm::NaiveBayes::Model::Frequency;<br/><br/>in the script that&#39;s currently failing.<br/><br/> -Ken<br/><br/><br/>On May 30, 2007, at 1:47 PM, Ignacio J. Ortega Lopera wrote:<br/><br/>&gt; i&#39;m getting this:<br/>&gt;<br/>&gt; Can&#39;t locate object method &quot;predict&quot; via package<br/>&gt; &quot;Algorithm::NaiveBayes::Model::<br/>&gt; Frequency&quot; at<br/>&gt; /usr/lib/perl5/site_perl/5.8.0/AI/Categorizer/Learner/NaiveBayes.p<br/>&gt; m line 28.<br/>&gt;<br/>&gt; when trying to get hypoteses.. for a new doc....<br/>&gt;<br/>&gt; anyone know if this is a silly one?<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/06/msg572.html Wed, 06 Jun 2007 23:41:20 +0000 AI::Categorizer and Umlauts? by Robert Barta Hi,<br/><br/>I seem to have problems with umlauts, such as in words<br/><br/> Pr&auml;sentation<br/><br/>When a document is added with<br/><br/> return new AI::Categorizer::Document(name =&gt; $filename,<br/> content =&gt; $content);<br/><br/>to the collection, after loading and finish, the feature vector<br/>contains only fragments of these words, such as<br/><br/> pr =&gt; 1<br/> sentation =&gt; 1<br/><br/>Setting the locale on the shell or in Perl does not have any effect<br/><br/> use locale;<br/><br/>not even with turning on de_AT explicitly.<br/><br/>--<br/><br/>Aaaaaah, lib/AI/Categorizer/Document.pm is NOT using locale and use locale<br/>is very, uhm, local %-)<br/><br/>Patching the file does not seem to break the test cases.<br/><br/>\rho<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/06/msg571.html Mon, 04 Jun 2007 19:25:40 +0000 AI::Categorizer suggestion for repackaging by Robert Barta Hi,<br/><br/>This is probably more relevant to the maintainer of AI::Categorizer:<br/><br/>It would be a bit simpler to debianize the package if the dependency<br/>to the Weka system would be factored out to a separate Perl package.<br/><br/>Otherwise I have not found a problem in making it a Debian package.<br/><br/>\rho<br/> http://www.nntp.perl.org/group/perl.ai/2007/06/msg570.html Mon, 04 Jun 2007 19:25:25 +0000 Problems trying to predict by Ignacio J. Ortega Lopera i&#39;m getting this:<br/><br/>Can&#39;t locate object method &quot;predict&quot; via package<br/>&quot;Algorithm::NaiveBayes::Model::<br/>Frequency&quot; at<br/>/usr/lib/perl5/site_perl/5.8.0/AI/Categorizer/Learner/NaiveBayes.p<br/>m line 28.<br/><br/>when trying to get hypoteses.. for a new doc....<br/><br/>anyone know if this is a silly one?<br/><br/>Thanks in advance<br/><br/>Saludos, Ignacio J. Ortega<br/>----------------------------------------------------------------<br/>Technical manager<br/>http://www.derecho.com/ http://www.nntp.perl.org/group/perl.ai/2007/05/msg569.html Wed, 30 May 2007 11:47:45 +0000 package AI::Categorizer::Collection::DBI; by Ignacio J. Ortega Lopera http://www.nntp.perl.org/group/perl.ai/2007/05/msg568.html Wed, 30 May 2007 09:49:39 +0000 how to use the function of "feature selection" under AI::Categorizer by jhoon <br/>Hello, <br/> <br/>I&iexcl;&macr;d like to select more important features using AI::Categorizer, and so <br/>modified demo.pl as follows <br/>=== FROM === <br/>my $k = AI::Categorizer::KnowledgeSet-&gt;new( verbose =&gt; 1 ); <br/>=== TO === <br/>my $k = AI::Categorizer::KnowledgeSet-&gt;new( verbose =&gt; 1, <br/> feature_selector =&gt; new AI::Categorizer::FeatureSelector::DocFrequency( <br/>&iexcl;&iexcl; verbose =&gt; 1, <br/>&iexcl;&iexcl; features_kept =&gt; 1000 <br/>&iexcl;&iexcl; ) <br/>); <br/>=== END === <br/>I observed the performance according to change the value of features_kept, <br/>but the performance is always same. I&iexcl;&macr;d appreciate it if you tell me how <br/>to do the feature selection using AI::Categorizer? <br/> <br/>Thank you very much in advance. <br/> <br/>Jae-Hoon. <br/> <br/> <br/> http://www.nntp.perl.org/group/perl.ai/2007/05/msg567.html Fri, 25 May 2007 04:09:13 +0000 Re: how to do feature selection by Alan Gibson im not sure if this pertains to your problem exactly, but you probably<br/>want to specify the weighting method like<br/><br/>my $k = AI::Categorizer::KnowledgeSet-&gt;new( verbose =&gt; 1 ,<br/> features_kept = 5000,<br/> tfidf_weighting=&gt;&#39;nfc&#39;<br/>);<br/><br/>the default weighting is &#39;xxx&#39; which if i understand correctly doesnt<br/>actually do anything.<br/><br/>alan<br/> http://www.nntp.perl.org/group/perl.ai/2007/05/msg566.html Wed, 23 May 2007 19:24:41 +0000 how to do feature selection by Jianmin WU hi, buddies,<br/><br/>I am not sure if i am in the right place. :-)<br/><br/>I am a fresh man to the perl and perl AI module.<br/><br/>I am trying to do the NaiveBayes experiments with the help of code demo.pl in<br/>example of the module of AI::Categorizer.<br/>Now I am confused about how to do the feature selection.<br/><br/>The documents say that KnowledgeSet::load( ) will do feature selection and<br/>read the corpus at the same time. So, I change the construction of<br/>KnowledgeSet in<br/>demo.pl from<br/>my $k = AI::Categorizer::KnowledgeSet-&gt;new( verbose =&gt; 1 );<br/>$k-&gt;load( collection =&gt; $training )<br/>to<br/>my $k = AI::Categorizer::KnowledgeSet-&gt;new( verbose =&gt; 1 , features_kept =<br/>5000 );<br/>$k-&gt;load( collection =&gt; $training )<br/><br/>Then I re-run the code with expection to keep the top 5000 features with<br/>high Document Frequency.<br/>But it seems that there is no difference as before. do i misunderstand any<br/>point ?<br/><br/>And also, is there any smoothing method implemented in<br/>AI::Categorizer::Learner::NaiveBayes ?<br/><br/>Thanks for your attention<br/><br/>Jianmin http://www.nntp.perl.org/group/perl.ai/2007/05/msg565.html Sat, 19 May 2007 05:43:12 +0000 Re: [ANNOUNCE] AI-Categorizer 0.08 -> CPAN by mentifex &gt; Hi,<br/>&gt;<br/>&gt; After almost 4 years since the previous release,<br/>&gt; I&#39;ve uploaded a new AI::Categorizer to CPAN. <br/>&gt; It&#39;s a minor set of changes with only a <br/>&gt; couple bug fixes and additions:<br/>&gt; [...]<br/>&gt; -Ken<br/>Glad to hear the news of progress.<br/><br/>Arthur<br/>--<br/>http://mind.sourceforge.net/perl.html <br/>http://mind.sourceforge.net/Mind.html <br/> http://www.nntp.perl.org/group/perl.ai/2007/03/msg564.html Wed, 21 Mar 2007 04:34:39 +0000 [ANNOUNCE] AI-Categorizer 0.08 -> CPAN by Ken Williams Hi,<br/><br/>After almost 4 years since the previous release, I&#39;ve uploaded a new <br/>AI::Categorizer to CPAN. It&#39;s a minor set of changes with only a <br/>couple bug fixes and additions:<br/><br/><br/>0.08 - Tue Mar 20 19:39:41 2007<br/><br/> - Added a ChiSquared feature selection class. [Francois Paradis]<br/><br/> - Changed the web locations of the reuters-21578 corpus that<br/> eg/demo.pl uses, since the location it referenced previously has<br/> gone away.<br/><br/> - The building &amp; installing process now uses Module::Build rather<br/> than ExtUtils::MakeMaker.<br/><br/> - When the features_kept mechanism was used to explicitly state the<br/> features to use, and the scan_first parameter was left as its<br/> default value, the features_kept mechanism would silently fail to<br/> do anything. This has now been fixed. [Spotted by Arnaud Gaudinat]<br/><br/> - Recent versions of Weka have changed the name of the SVM class, so<br/> I&#39;ve updated it in our test (t/03-weka.t) of the Weka wrapper<br/> too. [Sebastien Aperghis-Tramoni]<br/><br/><br/> -Ken<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/03/msg563.html Wed, 21 Mar 2007 01:07:05 +0000 Probabilities with SVM by Alan Gibson im trying to use expectation-maximization to bootstrap an svm<br/>classifier. for this to work, the classifier needs to return better<br/>than random probabilities for its classification decisions. so not<br/>being one to repeat work, i thought i would see if anyone is setting<br/>on an implementation of AI::Categorizer::Learner::SVM that returns the<br/>probabilities produced by libsvm.<br/><br/>any code or criticisms would be greatly appreciated.<br/><br/>thanks,<br/>alan gibson<br/> http://www.nntp.perl.org/group/perl.ai/2007/03/msg562.html Sun, 11 Mar 2007 17:51:06 +0000 Re: text categorization with SVM and NaiveBayes by Ken Williams <br/>On Jan 8, 2007, at 10:51 AM, Tom Fawcett wrote:<br/><br/>&gt; Just to add a note here: Ken is correct -- both NB and SVMs are <br/>&gt; known to be rather poor at providing accurate probabilities. Their <br/>&gt; scores tend to be too extreme. Producing good probabilities from <br/>&gt; these scores is called calibrating the classifier, and it&#39;s more <br/>&gt; complex than just taking a root of the score. There are several <br/>&gt; methods for calibrating scores. The good news is that there&#39;s an <br/>&gt; effective one called isotonic regression (or Pool Adjacent <br/>&gt; Violators) which is pretty easy and fast. The bad news is that <br/>&gt; there&#39;s no plug-in (ie, CPAN-ready) perl implementation of it (I&#39;ve <br/>&gt; got a simple implementation which I should convert and contribute <br/>&gt; someday).<br/>&gt;<br/>&gt; If you want to read about classifier calibration, google one of <br/>&gt; these titles:<br/>&gt;<br/>&gt; &quot;Transforming classifier scores into accurate multiclass <br/>&gt; probability estimates&quot;<br/>&gt; by Bianca Zadrozny and Charles Elkan<br/>&gt;<br/>&gt; &quot;Predicting Good Probabilities With Supervised Learning&quot;<br/>&gt; by A. Niculescu-Mizil and R. Caruana<br/><br/><br/>Cool, thanks for the references. It might be nice to add somesuch <br/>scheme to Algorithm::NaiveBayes (and friends), so that the user has a <br/>choice of several normalization schemes, including &quot;none&quot;. If I get <br/>a surplus of tuits I&#39;ll add it, or if you feel like contributing your <br/>stuff that would be great too.<br/><br/> -Ken<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg561.html Tue, 09 Jan 2007 04:52:25 +0000 Re: text categorization with SVM and NaiveBayes by Tom Fawcett On Jan 7, 2007, at 9:23 PM, Ken Williams wrote:<br/>&gt;&gt; I would happily ignore all this and use NB, but it has one major <br/>&gt;&gt; flaw.<br/>&gt;&gt; &quot;The winner takes it all&quot;, the first result returned is way too far<br/>&gt;&gt; (as in distance :)) from the others, which isn&#39;t exactly accurate if<br/>&gt;&gt; one cares of a balanced results pool. I don&#39;t know whether this is an<br/>&gt;&gt; implementation problem - I poked around the rescale() function in<br/>&gt;&gt; Util.pm with no real success - or a general algorithm problem. My <br/>&gt;&gt; goal<br/>&gt;&gt; is to have an implementation that can say: this text is 60% cat X, <br/>&gt;&gt; 20%<br/>&gt;&gt; cat Y, 18% cat Z and 2% other cats. Is this feasible ? If so, what<br/>&gt;&gt; approach would you recommend (which algorithm, which <br/>&gt;&gt; implementation or<br/>&gt;&gt; what path for implementing it ) ?<br/>&gt;<br/>&gt; Unfortunately, neither NB nor SVMs can really tell you that. SVMs <br/>&gt; are purely discriminative, so all they can tell you is &quot;I think <br/>&gt; this new example is more like class A than class B in my training <br/>&gt; data&quot;. There&#39;s no probability involved at all. That said, I <br/>&gt; believe there has been some research into how to translate SVM <br/>&gt; output scores into probabilities or confidence scores, but I&#39;m not <br/>&gt; really familiar with it.<br/>&gt;<br/>&gt; NB on the surface would seem to be a better option since it&#39;s <br/>&gt; directly based on probabilities, but again the algorithm was <br/>&gt; designed only to discriminate, so all those denominators that are <br/>&gt; thrown away (the &quot;P(words)&quot; terms in the A::NB documentation) mean <br/>&gt; that the notion of probabilities is lost. The rescale() function <br/>&gt; is basically just a hack to return scores that are a little more <br/>&gt; convenient to work with than the raw output of the algorithm. As <br/>&gt; you&#39;ve seen, it tends to be a little arrogant, greatly exaggerating <br/>&gt; the score for the first category and giving tiny scores to the <br/>&gt; rest. I&#39;m sure there are better algorithms that could be used <br/>&gt; there, but in many cases either one doesn&#39;t really care about the <br/>&gt; actual scores, or one (*ahem*) does something ad hoc like taking <br/>&gt; the square root of all the scores, or the fifth root, or whatever, <br/>&gt; just to get some numbers that look better to end users.<br/><br/>Just to add a note here: Ken is correct -- both NB and SVMs are known <br/>to be rather poor at providing accurate probabilities. Their scores <br/>tend to be too extreme. Producing good probabilities from these <br/>scores is called calibrating the classifier, and it&#39;s more complex <br/>than just taking a root of the score. There are several methods for <br/>calibrating scores. The good news is that there&#39;s an effective one <br/>called isotonic regression (or Pool Adjacent Violators) which is <br/>pretty easy and fast. The bad news is that there&#39;s no plug-in (ie, <br/>CPAN-ready) perl implementation of it (I&#39;ve got a simple <br/>implementation which I should convert and contribute someday).<br/><br/>If you want to read about classifier calibration, google one of these <br/>titles:<br/><br/>&quot;Transforming classifier scores into accurate multiclass probability <br/>estimates&quot;<br/>by Bianca Zadrozny and Charles Elkan<br/><br/>&quot;Predicting Good Probabilities With Supervised Learning&quot;<br/>by A. Niculescu-Mizil and R. Caruana<br/><br/>Regards,<br/>-Tom<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg560.html Mon, 08 Jan 2007 12:23:57 +0000 Re: text categorization with SVM and NaiveBayes by Ken Williams <br/>On Jan 5, 2007, at 7:10 AM, zgrim wrote:<br/><br/>&gt; So, back to my dilemmas. :) The results are puzzling, as many of the<br/>&gt; research papers on the subject I&#39;ve consulted say that SVM is<br/>&gt; supposedly the best algorithm for this task. The radial kernel should<br/>&gt; give the best results, for empirical-found values of gamma and C.<br/><br/>This may be an issue with your corpus - I quite often find that when <br/>I don&#39;t have enough training data for the SVM to pick up on the <br/>&quot;truth&quot; patterns, or (somewhat equivalently) when there&#39;s a lot of <br/>noise in the data, a linear kernel will outperform a radial (RBF). I <br/>tend to think that&#39;s because the RBF is more expressive, and it&#39;s <br/>overfitting the noise in the training set.<br/><br/><br/>&gt; Ignoring the fact that SVM is much, much slower to train than NB, it<br/>&gt; still has worse accuracy. What am I doing wrong ?<br/><br/>That may be an accident of your corpus too. Are you using cross- <br/>validation for these experiments? If so, you should be able to get <br/>some error bars to tell whether the difference is statistically <br/>significant or not. I&#39;m guessing a 2% advantage may not be, in this <br/>case.<br/><br/>&gt; I would happily ignore all this and use NB, but it has one major flaw.<br/>&gt; &quot;The winner takes it all&quot;, the first result returned is way too far<br/>&gt; (as in distance :)) from the others, which isn&#39;t exactly accurate if<br/>&gt; one cares of a balanced results pool. I don&#39;t know whether this is an<br/>&gt; implementation problem - I poked around the rescale() function in<br/>&gt; Util.pm with no real success - or a general algorithm problem. My goal<br/>&gt; is to have an implementation that can say: this text is 60% cat X, 20%<br/>&gt; cat Y, 18% cat Z and 2% other cats. Is this feasible ? If so, what<br/>&gt; approach would you recommend (which algorithm, which implementation or<br/>&gt; what path for implementing it ) ?<br/><br/>Unfortunately, neither NB nor SVMs can really tell you that. SVMs <br/>are purely discriminative, so all they can tell you is &quot;I think this <br/>new example is more like class A than class B in my training data&quot;. <br/>There&#39;s no probability involved at all. That said, I believe there <br/>has been some research into how to translate SVM output scores into <br/>probabilities or confidence scores, but I&#39;m not really familiar with it.<br/><br/>NB on the surface would seem to be a better option since it&#39;s <br/>directly based on probabilities, but again the algorithm was designed <br/>only to discriminate, so all those denominators that are thrown away <br/>(the &quot;P(words)&quot; terms in the A::NB documentation) mean that the <br/>notion of probabilities is lost. The rescale() function is basically <br/>just a hack to return scores that are a little more convenient to <br/>work with than the raw output of the algorithm. As you&#39;ve seen, it <br/>tends to be a little arrogant, greatly exaggerating the score for the <br/>first category and giving tiny scores to the rest. I&#39;m sure there <br/>are better algorithms that could be used there, but in many cases <br/>either one doesn&#39;t really care about the actual scores, or one <br/>(*ahem*) does something ad hoc like taking the square root of all the <br/>scores, or the fifth root, or whatever, just to get some numbers that <br/>look better to end users.<br/><br/>As for a better alternative, I&#39;m not familiar with any that will be <br/>as accessible from a perl world, but you might want to look at some <br/>language modeling papers - I really like the LDA papers from Michael <br/>Jordan (no, not that Michael Jordan, this one: http:// <br/>citeseer.ist.psu.edu/541352.html), which are by no means <br/>straightforward, but they will indeed let you describe each document <br/>as generated by a mixture of categories.<br/><br/> -Ken<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg559.html Mon, 08 Jan 2007 04:20:12 +0000 text categorization with SVM and NaiveBayes by zgrim Hello,<br/> I am &quot;playing&quot; with the task of automated text categorization and<br/>inevitably hit a few dilemmas. I have tried different combinations of<br/>SVM and NaiveBayes, here are some results:<br/>- algorithm::svm (single world, through AI::Categorizer) ~ 92%<br/>accuracy (with the linear kernel, the radial one has bellow 10% with<br/>all sorts of values tried for gamma and c)<br/>- algorithm::svmlight ( nr. of categories worlds - each trained<br/>against the others ) ~ 62% in ranking mode<br/>- algorithm::naivebayes (one world, through AI::Categorizer) ~ 94%<br/>- algorithm::naivebayes (each against all other) ~ 73%<br/><br/>These are on the same corpus ( which isn&#39;t perfect at all, but that a<br/>negligible information for now :) ).<br/>By accuracy I mean tested accuracy on a single category, which is, if<br/>the first category returned (highest score) is the supposed one, it&#39;s<br/>a hit, else, a miss.<br/>By single world I mean all categories build a single model, against<br/>tests are run. By multiple worlds (each against all other) I mean each<br/>category builds a model in which the tokens from that category are<br/>positive and the tokens from all other categories are negative.<br/><br/>So, back to my dilemmas. :) The results are puzzling, as many of the<br/>research papers on the subject I&#39;ve consulted say that SVM is<br/>supposedly the best algorithm for this task. The radial kernel should<br/>give the best results, for empirical-found values of gamma and C.<br/>Ignoring the fact that SVM is much, much slower to train than NB, it<br/>still has worse accuracy. What am I doing wrong ?<br/>I would happily ignore all this and use NB, but it has one major flaw.<br/>&quot;The winner takes it all&quot;, the first result returned is way too far<br/>(as in distance :)) from the others, which isn&#39;t exactly accurate if<br/>one cares of a balanced results pool. I don&#39;t know whether this is an<br/>implementation problem - I poked around the rescale() function in<br/>Util.pm with no real success - or a general algorithm problem. My goal<br/>is to have an implementation that can say: this text is 60% cat X, 20%<br/>cat Y, 18% cat Z and 2% other cats. Is this feasible ? If so, what<br/>approach would you recommend (which algorithm, which implementation or<br/>what path for implementing it ) ?<br/>TIA<br/><br/>-- <br/>perl -MLWP::Simple -e&#39;print$_[rand(split(q|%%\n|,<br/>get(q=http://cpan.org/misc/japh=)))]&#39;<br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg558.html Fri, 05 Jan 2007 05:10:40 +0000 Creating Collection of uncategorized data by Alan Gibson Hello,<br/><br/>First post to this list. Im beginning a project that will use<br/>automated text classification to classify congressional bills and<br/>AI::Categorizer looks like the best framework to use. However, Im<br/>hitting a snag on what should be a simple operation.<br/><br/>I train an svm classifier on 1000 documents; this operation goes fine.<br/>I then try to create an instance of AI::Categorizer::Collection::Files<br/>containing 5 unclassified documents. I supply only the path because<br/>the 5 documents are not yet categorized:<br/><br/> my $c = new AI::Categorizer::Collection::Files(<br/> path =&gt; &quot;$path&quot;);<br/> while (my $document = $c-&gt;next) {<br/> my $hypothesis = $nb-&gt;categorize($document);<br/> print &quot;Best assigned category: &quot;, $hypothesis-&gt;best_category, &quot;\n&quot;;<br/> print &quot;All assigned categories: &quot;, join(&#39;, &#39;,<br/>$hypothesis-&gt;categories), &quot;\n&quot;;<br/> }<br/><br/>This produces the error<br/><br/>No category information about &#39;5-508&#39; at<br/>/usr/local/share/perl/5.8.7/AI/Categorizer/Collection/Files.pm line<br/>44.<br/>Mandatory parameter &#39;all_categories&#39; missing in call to<br/>AI::Categorizer::Hypothesis-&gt;new()<br/><br/>To get around this error I could just supply the categories of the 5<br/>unknown test documents, but in our real world application we will have<br/>a constant stream of unclassified documents coming in that will<br/>recieve human attention only long after they have been automatically<br/>classified.<br/><br/>Is the design intent to only allow test documents that already are<br/>categorized (eg for creating confidence statistics)? If so, does<br/>anyone have any suggestions on the preffered way to classifiy unknown<br/>documents with AI::Categorizer?<br/><br/>Thanks,<br/>Alan<br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg557.html Thu, 04 Jan 2007 19:25:49 +0000 Re: ai::categorize samples by Russell Foltz-Smith Thanks, that&#39;s helpful. It&#39;s very difficult to find this corpus, <br/>especially in most of the existing documentation on AI::Categorizer.<br/><br/>Thanks, Dr. Math.<br/><br/>Russ<br/><br/>Ken Williams wrote:<br/>&gt; On Jan 2, 2007, at 8:53 PM, Russell Foltz-Smith wrote:<br/>&gt;<br/>&gt;&gt; Does someone have an examples category text file that works with the<br/>&gt;&gt; demo.pl?<br/>&gt;<br/>&gt; Yup, you can download it from <br/>&gt; http://campstaff.com/~ken/reuters-21578.tar.gz .<br/>&gt;<br/>&gt;<br/>&gt;&gt; Also, does anyone know of an online/web service implementation for web<br/>&gt;&gt; pages/urls to categorize them into dmoz categories?<br/>&gt;<br/>&gt; Not I.<br/>&gt;<br/>&gt; -Ken<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg556.html Thu, 04 Jan 2007 06:39:30 +0000 Re: ai::categorize samples by Ken Williams On Jan 2, 2007, at 8:53 PM, Russell Foltz-Smith wrote:<br/><br/>&gt; Does someone have an examples category text file that works with the<br/>&gt; demo.pl?<br/><br/>Yup, you can download it from http://campstaff.com/~ken/ <br/>reuters-21578.tar.gz .<br/><br/><br/>&gt; Also, does anyone know of an online/web service implementation for web<br/>&gt; pages/urls to categorize them into dmoz categories?<br/><br/>Not I.<br/><br/> -Ken<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg555.html Thu, 04 Jan 2007 04:16:05 +0000 ai::categorize samples by Russell Foltz-Smith Does someone have an examples category text file that works with the <br/>demo.pl?<br/><br/>Also, does anyone know of an online/web service implementation for web <br/>pages/urls to categorize them into dmoz categories?<br/><br/>Russ Smith<br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg554.html Wed, 03 Jan 2007 03:23:38 +0000 ai::categorize samples by Russell Foltz-Smith Does someone have an examples category text file that works with the<br/>demo.pl?<br/><br/>Also, does anyone know of an online/web service implementation for web<br/>pages/urls to categorize them into dmoz categories?<br/><br/>Russ Smith<br/><br/><br/> http://www.nntp.perl.org/group/perl.ai/2007/01/msg553.html Tue, 02 Jan 2007 18:53:20 +0000 Re: AI::Genetic by Gregg Allen Awesome! That helped a lot. I&#39;m looking forward to your new and <br/>improved module.<br/><br/>Thanks for creating that module, in the first place, also. When I <br/>first discovered the module about a year ago, I ran about a dozen <br/>random optimization problems from my graduate level operations <br/>research textbook from 25 years ago.<br/><br/>I didn&#39;t find a single one it couldn&#39;t solve in less than a few <br/>minutes. (Mere seconds in most cases.)<br/><br/>Thanks!<br/><br/>Gregg Allen<br/>Cerebra, Inc.<br/><br/><br/><br/><br/>On Dec 8, 2006, at 8:56 AM, Ala Qumsieh wrote:<br/><br/>&gt;<br/>&gt; --- Benjamin Tucker &lt;ben@greenriver.org&gt; wrote:<br/>&gt;<br/>&gt;&gt; I don&#39;t actually have any experience with<br/>&gt;&gt; AI::Genetic, but<br/>&gt;&gt; Storable.pm is probably your best bet. Take a look<br/>&gt;&gt; at how<br/>&gt;&gt; AI::Categorizer interfaces with it:<br/>&gt;&gt;<br/>&gt; http://search.cpan.org/src/KWILLIAMS/AI-Categorizer-0.07/lib/AI/<br/>&gt;&gt;<br/>&gt;&gt; Categorizer/Storable.pm<br/>&gt;&gt;<br/>&gt;&gt; If you throw something like this into the bottom of<br/>&gt;&gt; one of your perl<br/>&gt;&gt; files, you should be able just to call<br/>&gt;&gt; $gen-&gt;store_state(&#39;filename&#39;) and then<br/>&gt;&gt; $gen-&gt;restore_state<br/>&gt;&gt; (&#39;filename&#39;) (where $gen is an instance of<br/>&gt;&gt; AI::Genetic)<br/>&gt;<br/>&gt; [snip code]<br/>&gt;<br/>&gt; Thanks. That&#39;s an excellent suggestion. I&#39;ll add that<br/>&gt; to AI::Genetic and upload a new version soon.<br/>&gt;<br/>&gt; Thanks,<br/>&gt; --Ala<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; ______________________________________________________________________ <br/>&gt; ______________<br/>&gt; Do you Yahoo!?<br/>&gt; Everyone is raving about the all-new Yahoo! Mail beta.<br/>&gt; http://new.mail.yahoo.com<br/><br/> http://www.nntp.perl.org/group/perl.ai/2006/12/msg552.html Sat, 09 Dec 2006 03:16:17 +0000 Re: AI::Genetic by Ala Qumsieh <br/>--- Benjamin Tucker &lt;ben@greenriver.org&gt; wrote:<br/><br/>&gt; I don&#39;t actually have any experience with<br/>&gt; AI::Genetic, but <br/>&gt; Storable.pm is probably your best bet. Take a look<br/>&gt; at how <br/>&gt; AI::Categorizer interfaces with it:<br/>&gt;<br/>http://search.cpan.org/src/KWILLIAMS/AI-Categorizer-0.07/lib/AI/<br/>&gt; <br/>&gt; Categorizer/Storable.pm<br/>&gt; <br/>&gt; If you throw something like this into the bottom of<br/>&gt; one of your perl <br/>&gt; files, you should be able just to call<br/>&gt; $gen-&gt;store_state(&#39;filename&#39;) and then<br/>&gt; $gen-&gt;restore_state <br/>&gt; (&#39;filename&#39;) (where $gen is an instance of<br/>&gt; AI::Genetic)<br/><br/>[snip code]<br/><br/>Thanks. That&#39;s an excellent suggestion. I&#39;ll add that<br/>to AI::Genetic and upload a new version soon.<br/><br/>Thanks,<br/>--Ala<br/><br/><br/><br/> <br/>____________________________________________________________________________________<br/>Do you Yahoo!?<br/>Everyone is raving about the all-new Yahoo! Mail beta.<br/>http://new.mail.yahoo.com<br/> http://www.nntp.perl.org/group/perl.ai/2006/12/msg551.html Fri, 08 Dec 2006 07:56:29 +0000 Re: AI::Genetic by Benjamin Tucker I don&#39;t actually have any experience with AI::Genetic, but <br/>Storable.pm is probably your best bet. Take a look at how <br/>AI::Categorizer interfaces with it:<br/>http://search.cpan.org/src/KWILLIAMS/AI-Categorizer-0.07/lib/AI/ <br/>Categorizer/Storable.pm<br/><br/>If you throw something like this into the bottom of one of your perl <br/>files, you should be able just to call<br/>$gen-&gt;store_state(&#39;filename&#39;) and then $gen-&gt;restore_state <br/>(&#39;filename&#39;) (where $gen is an instance of AI::Genetic)<br/><br/>package AI::Genetic;<br/><br/>use strict;<br/>use Storable;<br/>use File::Spec ();<br/>use File::Path ();<br/><br/>sub save_state {<br/> my ($self, $path) = @_;<br/> if (-e $path) {<br/> File::Path::rmtree($path) or die &quot;Couldn&#39;t overwrite $path: $!&quot;;<br/> }<br/> mkdir($path, 0777) or die &quot;Can&#39;t create $path: $!&quot;;<br/> Storable::nstore($self, File::Spec-&gt;catfile($path, &#39;self&#39;));<br/>}<br/><br/>sub restore_state {<br/> my ($package, $path) = @_;<br/> return Storable::retrieve(File::Spec-&gt;catfile($path, &#39;self&#39;));<br/>}<br/><br/>1;<br/><br/>Ben<br/><br/>On Dec 8, 2006, at 9:37 AM, Brad Larsen wrote:<br/><br/>&gt; One (possibly stupid) suggestion is to look at Data::Dumper. It <br/>&gt; should work, but may be very slow if the object in question is <br/>&gt; large. Let us know if you find anything better.<br/>&gt;<br/>&gt; Cheers,<br/>&gt; Brad Larsen<br/>&gt;<br/>&gt; greggallen@gmail.com wrote:<br/>&gt;&gt; I know this is going to turn out to be a stupid question, but <br/>&gt;&gt; could someone tell me the easiest way to store and retrieve the <br/>&gt;&gt; state of the entire AI::Genetic colony, and parameters, to a disk <br/>&gt;&gt; file so it can be read in and out at will?<br/>&gt;&gt; I&#39;m doing some constrained optimization experiments that can take <br/>&gt;&gt; several days, even a week, to run in the background, but I have a <br/>&gt;&gt; computer (Mac OS X 10.4.8) that is shared, and I need to install <br/>&gt;&gt; software and restart it almost daily.<br/>&gt;&gt; I would like to save the entire thing about every hour, but I can <br/>&gt;&gt; handle the timing part myself.<br/>&gt;&gt; Sincerely,<br/>&gt;&gt; Gregg Allen<br/>&gt;&gt; Cerebra, Inc.<br/><br/> http://www.nntp.perl.org/group/perl.ai/2006/12/msg550.html Fri, 08 Dec 2006 07:13:17 +0000 Re: AI::Genetic by Brad Larsen One (possibly stupid) suggestion is to look at Data::Dumper. It should <br/>work, but may be very slow if the object in question is large. Let us <br/>know if you find anything better.<br/><br/>Cheers,<br/>Brad Larsen<br/><br/>greggallen@gmail.com wrote:<br/>&gt; <br/>&gt; I know this is going to turn out to be a stupid question, but could <br/>&gt; someone tell me the easiest way to store and retrieve the state of the <br/>&gt; entire AI::Genetic colony, and parameters, to a disk file so it can be <br/>&gt; read in and out at will?<br/>&gt; <br/>&gt; I&#39;m doing some constrained optimization experiments that can take <br/>&gt; several days, even a week, to run in the background, but I have a <br/>&gt; computer (Mac OS X 10.4.8) that is shared, and I need to install <br/>&gt; software and restart it almost daily.<br/>&gt; <br/>&gt; I would like to save the entire thing about every hour, but I can <br/>&gt; handle the timing part myself.<br/>&gt; <br/>&gt; <br/>&gt; Sincerely,<br/>&gt; <br/>&gt; Gregg Allen<br/>&gt; Cerebra, Inc.<br/>&gt; <br/>&gt; <br/>&gt; <br/> http://www.nntp.perl.org/group/perl.ai/2006/12/msg549.html Fri, 08 Dec 2006 06:38:17 +0000