Scénario de test & Cas d'usage
Extraction of Boolean rules for classification.
Discover all actions of boolRuleSimulation of a large dataset with 100,000 documents and random term associations to stress test the action.
| 1 | |
| 2 | DATA casuser.large_patient_data; |
| 3 | call streaminit(12345); |
| 4 | DO patient_id = 1 to 100000; |
| 5 | DO k = 1 to 5; |
| 6 | term_code = rand('integer', 1, 50); |
| 7 | OUTPUT; |
| 8 | END; |
| 9 | END; |
| 10 | |
| 11 | RUN; |
| 12 | |
| 13 | DATA casuser.trial_rules; |
| 14 | INPUT ruleid termid; |
| 15 | DATALINES; |
| 16 | 1 10 1 20 2 5 2 15 ; |
| 17 | |
| 18 | RUN; |
| 19 |
| 1 | |
| 2 | PROC CAS; |
| 3 | boolRule.brScore TABLE={name='large_patient_data', caslib='casuser'} ruleTerms={name='trial_rules', caslib='casuser'} docId='patient_id' termId='term_code' nThreads=8 casOut={name='trial_candidates', caslib='casuser', replace=true}; |
| 4 | |
| 5 | QUIT; |
| 6 |
The action completes successfully without memory errors. The 'trial_candidates' table contains 100,000 rows (one per patient) with binary flags indicating if they meet the criteria for Rule 1 or Rule 2.