Scénario de test & Cas d'usage
Simulating high-volume sensor data with varying magnitudes and a weight variable.
| 1 | |
| 2 | DATA casuser.sensors; |
| 3 | call streaminit(456); |
| 4 | array s[10] s1-s10; |
| 5 | DO i = 1 to 50000; |
| 6 | DO j = 1 to 10; |
| 7 | IF j <= 5 THEN s[j] = rand('Normal', 10, 1); |
| 8 | ELSE s[j] = rand('Normal', 1000, 50); |
| 9 | END; |
| 10 | machine_weight = rand('Uniform'); |
| 11 | OUTPUT; |
| 12 | END; |
| 13 | |
| 14 | RUN; |
| 15 |
| 1 | |
| 2 | PROC CAS; |
| 3 | pca.eig / TABLE={name='sensors', caslib='casuser'} inputs={'s1', 's2', 's3', 's4', 's5', 's6', 's7', 's8', 's9', 's10'} cov=true weight='machine_weight' gpu={enable=true} OUTPUT={casOut={name='sensor_scores', caslib='casuser', replace=true}, score='Component'}; |
| 4 | |
| 5 | RUN; |
| 6 |
The action uses the raw variance (Covariance) where 's6-s10' (larger magnitude) will likely dominate the first component. The analysis considers 'machine_weight'. If GPU is available, processing is accelerated.