Scénario de test & Cas d'usage
Extraction de règles booléennes pour la classification.
Découvrir toutes les actions de boolRuleSimulation d'un corpus d'emails (Spam/Ham) avec des termes récurrents (bruit) et spécifiques.
| 1 | |
| 2 | DATA casuser.emails; |
| 3 | LENGTH eid $10 type $10; |
| 4 | INPUT eid type; |
| 5 | DATALINES; |
| 6 | E1 Spam E2 Ham E3 Spam E4 Spam E5 Ham E6 Ham E7 Spam E8 Spam ; |
| 7 | |
| 8 | RUN; |
| 9 | |
| 10 | DATA casuser.email_terms; |
| 11 | LENGTH eid $10 word $20; |
| 12 | INPUT eid word; |
| 13 | DATALINES; |
| 14 | E1 gratuit E1 offre E2 reunion E2 projet E3 gratuit E3 argent E4 offre E4 urgent E5 projet E5 rapport E6 reunion E6 date E7 urgent E7 argent E8 gratuit E8 offre ; |
| 15 | |
| 16 | RUN; |
| 17 |
| 1 | |
| 2 | PROC CAS; |
| 3 | boolRule.brTrain / TABLE={name='email_terms'} docId='eid' termId='word' docInfo={ TABLE={name='emails'}, id='eid', targets={'type'} } maxCandidates=50 minSupports=2 gPositive=2 casOut={candidateTerms={name='candidats_spam', replace=true}}; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
Seuls les termes apparaissant au moins 2 fois (ex: 'gratuit', 'offre') sont considérés. La table 'candidats_spam' montre une liste réduite de termes pertinents, ignorant les mots uniques ou peu fréquents.