boolRule brTrain

Standard Classification of IT Support Tickets

Scénario de test & Cas d'usage

Business Context

An IT department wants to automatically categorize support tickets into 'Hardware' or 'Software' categories based on keywords found in the ticket descriptions to route them to the correct support team efficiently.
About the Set : boolRule

Extraction of Boolean rules for classification.

Discover all actions of boolRule
Data Preparation

Creation of a small dataset representing IT tickets. Terms are mapped to IDs (e.g., 10='Screen', 11='Crash').

Copied!
1 
2DATA casuser.ticket_terms;
3INPUT ticket_id keyword_id;
4DATALINES;
51 10 1 12 2 10 3 15 4 11 4 15 5 11 6 12 ;
6 
7RUN;
8 
9DATA casuser.ticket_info;
10LENGTH category $10;
11INPUT ticket_id category $;
12DATALINES;
131 Hardware 2 Hardware 3 Hardware 4 Software 5 Software 6 Software ;
14 
15RUN;
16 

Étapes de réalisation

1
Load data tables into CAS (Implicit in data prep, verifying existence)
Copied!
1 
2PROC CAS;
3TABLE.tableExists RESULT=r STATUS=s / name='ticket_terms';
4 
5RUN;
6 
2
Execute brTrain to generate boolean rules for classification
Copied!
1 
2PROC CAS;
3boolRule.brTrain / TABLE={name='ticket_terms'} docId='ticket_id' termId='keyword_id' docInfo={TABLE={name='ticket_info'}, id='ticket_id', targets={'category'}} casOut={name='ticket_rules', replace=true};
4 
5RUN;
6 

Expected Result


The action successfully generates a 'ticket_rules' table containing IF-THEN logic linking terms (like 10/Screen) to the 'Hardware' category and terms (like 11/Crash) to 'Software'.