Scénario de test & Cas d'usage
Extraction of Boolean rules for classification.
Discover all actions of boolRuleCreation of data where terms appear very infrequently (fewer than the threshold we will set).
| 1 | |
| 2 | DATA casuser.rare_symptoms; |
| 3 | INPUT patient_id symptom_id; |
| 4 | DATALINES; |
| 5 | 1 99 2 99 3 50 4 50 ; |
| 6 | |
| 7 | RUN; |
| 8 | |
| 9 | DATA casuser.diagnosis; |
| 10 | INPUT patient_id RESULT $; |
| 11 | DATALINES; |
| 12 | 1 Positive 2 Positive 3 Negative 4 Negative ; |
| 13 | |
| 14 | RUN; |
| 15 |
| 1 | |
| 2 | PROC CAS; |
| 3 | boolRule.brTrain / TABLE={name='rare_symptoms'} docId='patient_id' termId='symptom_id' docInfo={TABLE={name='diagnosis'}, id='patient_id', targets={'result'}} minSupports=5 gPositive=20 casOut={name='strict_rules', replace=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
| 1 | |
| 2 | PROC CAS; |
| 3 | SIMPLE.numRows / TABLE={name='strict_rules'}; |
| 4 | |
| 5 | RUN; |
| 6 |
The action runs without error, but the resulting 'strict_rules' table should be empty (0 rows) because no term appears 5 times (max occurrence is 2), confirming the filtering logic works.