bart bartGauss

Standard Case: Predicting Remaining Useful Life of Industrial Equipment

Scénario de test & Cas d'usage

Business Context

An industrial manufacturing company wants to predict the Remaining Useful Life (RUL) in hours for a critical machine component. The goal is to move from a fixed-schedule maintenance plan to a predictive one, reducing downtime and costs. The model needs to interpret non-linear signals from various sensors and account for different machine types.
About the Set : bart

Bayesian Additive Regression Trees models.

Discover all actions of bart
Data Preparation

Creates a dataset named 'machine_sensors'. The target 'rul_hours' is a function of sensor readings, machine age, and type, with non-linear patterns and random noise to simulate real-world conditions.

Copied!
1DATA machine_sensors;
2 call streaminit(42);
3 DO machine_id = 1 to 2000;
4 machine_type = ifn(rand('UNIFORM') < 0.4, 'TypeA', 'TypeB');
5 age_days = floor(rand('UNIFORM') * 1000);
6 sensor1_vibration = 5 * cos(age_days / 100) + rand('NORMAL', 0, 0.5);
7 sensor2_temp = 70 + 0.05 * age_days + rand('NORMAL', 0, 2) + ifn(machine_type='TypeB', 10, 0);
8 rul_hours = 5000 - (age_days * 2) - (sensor1_vibration**2 * 10) - (sensor2_temp - 70)*5 + rand('NORMAL', 0, 50);
9 IF rul_hours < 0 THEN rul_hours = 0;
10 OUTPUT;
11 END;
12RUN;

Étapes de réalisation

1
Load the machine sensor data into the CAS server.
Copied!
1PROC CASUTIL;
2 load DATA=machine_sensors casout='machine_sensors' replace;
3RUN;
4QUIT;
2
Execute the bartGauss action to train the RUL prediction model. The model is stored for future scoring, and predictions are generated.
Copied!
1PROC CAS;
2 LOADACTIONSET 'bart';
3 bart.bartGauss /
4 TABLE={name='machine_sensors'},
5 target='rul_hours',
6 inputs={'age_days', 'sensor1_vibration', 'sensor2_temp', 'machine_type'},
7 nominals={'machine_type'},
8 nTree=50,
9 nBI=200,
10 nMC=1000,
11 seed=1234,
12 store={name='rul_model_store', replace=true},
13 OUTPUT={casOut={name='rul_predictions', replace=true}, pred='predicted_rul', resid='residual'},
14 outputTables={names={'VarImp', 'FitStatistics'}};
15RUN;
16QUIT;

Expected Result


The action successfully trains a BART model and saves it to 'rul_model_store'. An output table 'rul_predictions' is created containing the original data plus columns for the predicted RUL and residuals. The 'VarImp' table should show that 'age_days' and sensor readings are important predictors. The model is ready to be used by the 'bartScore' action on new data.