Action Principale : bartScore
| 1 | PROC CAS; |
| 2 | DATA mycas.train_data; |
| 3 | DO i = 1 to 100; |
| 4 | x1 = rand('UNIFORM'); |
| 5 | x2 = rand('UNIFORM'); |
| 6 | x3 = rand('NORMAL'); |
| 7 | y = 10 * sin(3.14 * x1 * x2) + 20 * (x3 - 0.5)**2 + 10 * x1 + 5 * x2 + rand('NORMAL'); |
| 8 | OUTPUT; |
| 9 | END; |
| 10 | RUN; |
| 11 | |
| 12 | DATA mycas.score_data; |
| 13 | DO i = 1 to 50; |
| 14 | x1 = rand('UNIFORM'); |
| 15 | x2 = rand('UNIFORM'); |
| 16 | x3 = rand('NORMAL'); |
| 17 | OUTPUT; |
| 18 | END; |
| 19 | RUN; |
| 20 | |
| 21 | bart.bartGauss / |
| 22 | TABLE='train_data', |
| 23 | inputs={{name='x1'}, {name='x2'}, {name='x3'}}, |
| 24 | target='y', |
| 25 | saveState={name='bart_model', replace=true}; |
| 26 | QUIT; |