Scénario de test & Cas d'usage
Extraction of Boolean rules for classification.
Discover all actions of boolRuleCreation of a document-term matrix representing support tickets and a rule definition table.
| 1 | |
| 2 | DATA casuser.ticket_terms; |
| 3 | INPUT ticket_id term_id; |
| 4 | DATALINES; |
| 5 | 101 1 101 2 102 3 103 1 103 4 ; |
| 6 | |
| 7 | RUN; |
| 8 | |
| 9 | DATA casuser.defined_rules; |
| 10 | INPUT ruleid termid; |
| 11 | DATALINES; |
| 12 | 1 1 1 2 2 3 ; |
| 13 | |
| 14 | RUN; |
| 15 |
| 1 | |
| 2 | PROC CAS; |
| 3 | boolRule.brScore TABLE={name='ticket_terms', caslib='casuser'} ruleTerms={name='defined_rules', caslib='casuser'} docId='ticket_id' termId='term_id' casOut={name='scored_tickets', caslib='casuser', replace=true}; |
| 4 | |
| 5 | QUIT; |
| 6 |
The 'scored_tickets' table is created. Ticket 101 should match Rule 1 (terms 1 and 2 present). Ticket 102 should match Rule 2 (term 3 present). Ticket 103 has term 1 but missing term 2, so it should not match Rule 1.