I have experienced that the feature extraction node can give varying results based on the random seed used for RPCA/SVD. I have a feature extraction node which has resulted in high scores, so I would like to be able to reuse that exact node in another project/pipeline. Duplicating does not work as it will reset the seed, resulting in different outcomes. Does anyone know how I can copy the node (with its seed) or use its score code in a different project?
Thank you in advance!
Hi @DvdM
If you want to re-use the output data from the node you can view and save the output data from the node results. This can be saved as an in-memory CAS table for use in other projects.
If you want to re-use the code used to generate the results, you can save the score code from the node. This is on the summary tab of the node results.
An example of the score code (you can use the programming tasks in SAS Studio to generate the code for you)
*Point to score code saved from Model Studio Node;
filename sfile '/home/sukhsn/casuser/PCA_Score.sas';
*Create output dataset calling score file;
data CASUSER.PCA_OUT;
set CASUSER.HMEQ;
%include sfile;
run;
*View results;
proc print data = CASUSER.PCA_OUT;run;
If you want to re-use the settings you selected for the node, you can save the node to the exchange. This can then be added to new Model Studio pipelines for re-use.
I hope this helps
Harry
Hi @DvdM
If you want to re-use the output data from the node you can view and save the output data from the node results. This can be saved as an in-memory CAS table for use in other projects.
If you want to re-use the code used to generate the results, you can save the score code from the node. This is on the summary tab of the node results.
An example of the score code (you can use the programming tasks in SAS Studio to generate the code for you)
*Point to score code saved from Model Studio Node;
filename sfile '/home/sukhsn/casuser/PCA_Score.sas';
*Create output dataset calling score file;
data CASUSER.PCA_OUT;
set CASUSER.HMEQ;
%include sfile;
run;
*View results;
proc print data = CASUSER.PCA_OUT;run;
If you want to re-use the settings you selected for the node, you can save the node to the exchange. This can then be added to new Model Studio pipelines for re-use.
I hope this helps
Harry
Thank you very much for your reply Harry. I indeed want to re-use the generated code to score other data. I saved the score code from the node and uploaded it to my folder. However, when I run the exact code that you supplied (with the necessary changes of user information of course) I get the error 'Libref CASUSER is not assigned'. Could you tell me how I could resolve this?
Thank you again!
Hi @DvdM you need to have an active CAS session to run the score code. To assign the CASUSER CASLIB you can simply run
libname casuser cas;
Thanks
Harry
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!