Scénario de test & Cas d'usage
Training of classical artificial neural networks.
Discover all actions of neuralNetCreates a `patient_records` table. Patient P01 has a pre-existing diagnosis. P02 is a new patient with complete data. P03 is a new patient with a missing `BloodPressure` value. The model `diagnostic_model` is assumed to exist.
| 1 | DATA mycas.patient_records(promote=yes); |
| 2 | LENGTH Diagnosis $20.; |
| 3 | INPUT PatientID Age BloodPressure Cholesterol Diagnosis $; |
| 4 | DATALINES; |
| 5 | 1 65 140 200 Type2Diabetes |
| 6 | 2 45 120 190 . |
| 7 | 3 55 . 220 . |
| 8 | 4 70 160 . . |
| 9 | ; |
| 10 | RUN; |
| 1 | PROC CAS; |
| 2 | neuralNet.annScore / |
| 3 | TABLE={name='patient_records'}, |
| 4 | modelTable={name='diagnostic_model'}, |
| 5 | casOut={name='diagnostic_results', replace=true}, |
| 6 | copyVars={'PatientID'}, |
| 7 | impute=true; |
| 8 | RUN; |
| 9 | QUIT; |
| 1 | PROC CAS; |
| 2 | TABLE.fetch / TABLE='diagnostic_results'; |
| 3 | RUN; |
| 4 | QUIT; |
The output table `mycas.diagnostic_results` will be created. For PatientID=1, the predicted value column `_NN_PredName_` should be 'Type2Diabetes', matching the source data. For PatientID=2 and PatientID=3, the `_NN_PredName_` column should contain a model-generated prediction. The action should complete without errors, demonstrating that the model's internal imputation handled the missing `BloodPressure` for P03 and missing `Cholesterol` for P04.