second attempt at dstttr training
Thomas Michael Hagen <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
here's my second attempt, after valuable input from ger:
comments and harsh criticism is very welcome :)
:classify: (:article:)
{
{
isolate (:stats:)
classify <osbf microgroom> [:article:] \
(bus.cfc cli.cfc con.cfc cul.cfc dom.cfc \
eco.cfc edu.cfc ene.cfc ent.cfc env.cfc \
for.cfc hea.cfc loc.cfc pol.cfc sci.cfc \
spo.cfc tec.cfc tra.cfc wor.cfc | unc.cfc out.cfc) (:stats:)
match (:: :class-conc:) [:stats:] /(...)\.cfc/
{ #classify succeeded, checking pR:
match (:: :pR:) [:stats:] /Best match.*: (.*) \nTotal/
output /pR::*:pR:. /
eval /:@::*:pR: > 30:/ #play around with this number
output /Classify succeeded as ':*:class-conc:'\n/
return
} #pR wasn't high enough; accumulating statistics:
isolate (:conc-file:) /:*:class-conc:.cfc/
learn <osbf microgroom> (:*:conc-file:) [:article:]
output /Classify succeeded, but threshold low. Piece trained INTO
':*:class-conc:'\n/
#reclassifying to check improvement:
isolate (:stats2:)
classify <osbf microgroom> [:article:] \
(bus.cfc cli.cfc con.cfc cul.cfc dom.cfc \
eco.cfc edu.cfc ene.cfc ent.cfc env.cfc \
for.cfc hea.cfc loc.cfc pol.cfc sci.cfc \
spo.cfc tec.cfc tra.cfc wor.cfc | unc.cfc out.cfc) (:stats2:)
match (:: :pR2:) [:stats2:] /Best match.*: (.*) \nTotal/
isolate (:improvement:)
eval (:improvement:) /:@:(:*:pR2: - :*:pR:):/
output /imp::*:improvement:\n/
{
eval /:@::*:improvement: > 3:/
eval /:@::*:pR2: > 10:/ #play around with this number too
output /Improvement high enough, and new threshold met; NO further
action taken\n/
return
} # imp wasn't high enough, and new threshold wasn't met
isolate (:refute-args:) /:*:conc-file::*:article:/
call /:refute:/ [:*:refute-args:] #this refutes the article from all the
other categories
return
} # classify failed (category is unc or out)
# my ad-hoc learning function (simply looks at the url to find
keywords):
call /:learn:/ [:*:article:]
{ # did learn fail?:
match [:learn-conc:] /unc/
match (:: :class-conc:) [:stats:] /(...)\.cfc/ #yes, has to be called
again here
isolate (:interaction:) /:*:class-conc::*:article::*:stats:/
call /:interact:/ [:*:interaction:] #ask a human for the right category
return
} # learn succeeded
output /Learn succeeded as ':*:learn-conc:' after classify FAILED as
':*:class-conc:'\n/
return
}
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Crm114-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crm114-general