RE: [Classifier4j-devel] Training and Classifying
Status: Beta
Brought to you by:
nicklothian
From: Neil G. <np...@nt...> - 2004-05-16 20:15:13
|
Hi Nick, The problem I am having is as follows: I wish to classify an unknown article against trained data, which is in the "word_probability" table. So, to do this I must use BayesianClassifier as follows: 1. Create an instance of JDBCWordsDataSource 2. Create a new instance of BayesianClassifier, passing the JDBCWordsDataSource to the constructor 3. Call BayesianClassifier.classify(String) However, by creating an instance of JDBCWordsDataSource (1), the constructor for this method creates a new table. ------ which I do not want because I will have to delete the table containing all my trained data. What I want is to be able to retrieve my trained data (in a JDBCWordsDataSource??), then classify the new article against this data. How can I do this? I would very much appreciate some sample code. Regards Nigel > -----Original Message----- > From: cla...@li... [mailto:classifier4j- > dev...@li...] On Behalf Of Nick Lothian > Sent: 15 May 2004 14:25 > To: cla...@li... > Subject: Re: [Classifier4j-devel] Training and Classifying > > > Are you referring to the Trainer.java & Analyser.java in the > net.sf.classifier4J.demo package? If so then these are intended as a > demo only (and a pretty old one at that). > > Classifier4J supports training directly via the teachMatch method (see > http://classifier4j.sourceforge.net/xref/net/sf/classifier4J/bayesian/Ba ye > sianClassifier.html#193). > > That supports data persistence via the IWordsDataSource interface, > in-particular the JDBCWordsDataSource > <../../../../net/sf/classifier4J/bayesian/JDBCWordsDataSource.html> > implementation of it. > > Nick > > np...@nt... wrote: > > >Hi, > > > >I would like to use Classifier4J to input "good" and "bad" articles; then > >provide the system with a new article for classification. > > > >Using Trainer.java I can input my articles into a table. However, how do > I continue adding articles to the table? > >The following line in Trainer.java always creates a new table, I would > like to continue adding to an existing table: > > > >JDBCWordsDataSource wds = new JDBCWordsDataSource(cm); > > > >I have a similar problem with Anayser.java. I would like the new article > to be > >classified against the table built from Trainer.java. However, the > >setupClassifier method in Analyser.java always creates a new table. > > > >I would very much appreciate any advice. > > > >Regards > > > >----------------------------------------- > >Email provided by http://www.ntlhome.com/ > > > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by: SourceForge.net Broadband > >Sign-up now for SourceForge Broadband and get the fastest > >6.0/768 connection for only $19.95/mo for the first 3 months! > >http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > >_______________________________________________ > >Classifier4j-devel mailing list > >Cla...@li... > >https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > > > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > _______________________________________________ > Classifier4j-devel mailing list > Cla...@li... > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel |