-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_4_FEATURE_SELECTION.flw
executable file
·1 lines (1 loc) · 11.9 KB
/
2_4_FEATURE_SELECTION.flw
1
{"creationTimeStamp":null,"modifiedTimeStamp":null,"createdBy":null,"modifiedBy":null,"version":2,"id":null,"name":"2_4_FEATURE_SELECTION.flw","description":null,"properties":{"UI_PROP_DF_OPTIMIZE":"false","UI_PROP_DF_ID":"a4e720b3-ec0c-4b75-8869-8afa8ed92086","UI_PROP_DF_EXECUTION_ORDERED":"false"},"links":[],"nodes":{"id-1733652457597-27564":{"nodeType":"step","version":1,"id":"id-1733652457597-27564","name":"Gradient boosting","note":{"version":1,"id":"id-1733652457604-27572","name":null,"description":null,"properties":{"UI_NOTE_PROP_IS_EXPANDED":"false","UI_NOTE_PROP_HEIGHT":"0","UI_NOTE_PROP_WIDTH":"0","UI_NOTE_PROP_IS_STICKYNOTE":"false"}},"priority":0,"properties":{"UI_PROP_XPOS":"929","UI_PROP_YPOS":"54","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"4905922e-cd29-4b66-ad33-33ec20ca28f9|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"21784aea-e12d-4a5e-941c-540b40fd8d3b|Output table 1|Output tables","UI_PROP_NODE_DATA_ID":"a7190700-f59c-4a94-afe2-214ce639fcde","UI_PROP_NODE_DATA_MODIFIED_DATE":"1721912191502"},"portMappings":[{"mappingType":"tableStructure","portName":"outTables","portIndex":0,"tableStructure":{"columnDefinitions":[]}}],"stepReference":{"type":"uri","path":"/dataFlows/steps/a7190700-f59c-4a94-afe2-214ce639fcde"},"arguments":{"codeOptions":{"code":"proc gradboost data=MYCAS.DATA_FS_CA_5D;\n\tpartition role=Selected (test='0');\n\ttarget y / level=nominal;\n\tinput A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63 / level=interval;\n\tscore out=MYCAS.OUTPUT_RES copyvars=(y A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63);\nrun;\n\ndata output_res;\n\tset mycas.output_res;\n\ty_pred = input(compress(I_y), 3.);\nrun;\n\n%score(output_res, y, y_pred);","logHTML":"","resultsHTML":"","variables":[{"name":"_output1","value":{"referenceType":"outputPort","portName":"outTables","portIndex":0,"arguments":{}}},{"name":"_input1","value":{"referenceType":"inputPort","portName":"inTables","portIndex":0}}],"contentType":"embedded"}}},"id-1733596955189-27722":{"nodeType":"step","version":1,"id":"id-1733596955189-27722","name":"Train-test split","note":{"version":1,"id":"id-1733596955204-27730","name":null,"description":null,"properties":{"UI_NOTE_PROP_IS_EXPANDED":"false","UI_NOTE_PROP_HEIGHT":"0","UI_NOTE_PROP_WIDTH":"0","UI_NOTE_PROP_IS_STICKYNOTE":"false"}},"priority":1,"properties":{"UI_PROP_XPOS":"186","UI_PROP_YPOS":"65","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"6f7a1122-3ea9-47c2-b211-c622fa48a398|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"0f4b920d-d146-478d-8993-ef83885d9261|Output table 1|Output tables","UI_PROP_NODE_DATA_ID":"a7190700-f59c-4a94-afe2-214ce639fcde","UI_PROP_NODE_DATA_MODIFIED_DATE":"1721912191502"},"portMappings":[{"mappingType":"tableStructure","portName":"outTables","portIndex":0,"tableStructure":{"columnDefinitions":[]}}],"stepReference":{"type":"uri","path":"/dataFlows/steps/a7190700-f59c-4a94-afe2-214ce639fcde"},"arguments":{"codeOptions":{"code":"proc surveyselect data=default.DATA_FS_CA_5D rate=0.7 outall out=DATA_FS_CA_5D seed=1234 noprint;\nrun;\n\nproc sql noprint;\n\tselect name\n\tinto :list separated by ' '\n\tfrom sashelp.vcolumn\n\twhere libname eq 'WORK' and memname eq 'DATA_FS_CA_5D' and name ne 'year' and name ne 'y' and name ne 'Selected'\n\t;\nquit;\n\n%macro check_stability();\n\t%let i=1;\n\t%let var = %scan(&list., &i., ' ');\n\t%do %while(&var ne);\n\t\tproc ttest data=DATA_FS_CA_5D sides=2 h0=0 plots=none;\n\t\t\tclass Selected;\n\t\t\tvar &var.;\n\t\trun;\n\t\t%let i=%eval(&i+1);\n\t\t%let var = %scan(&list., &i., ' ');\n\t%end;\n%mend;\n\n%check_stability();\n\nproc casutil;\n load data=DATA_FS_CA_5D casout=\"DATA_FS_CA_5D\" replace;\nrun;","logHTML":"","resultsHTML":"","variables":[{"name":"_output1","value":{"referenceType":"outputPort","portName":"outTables","portIndex":0,"arguments":{}}},{"name":"_input1","value":{"referenceType":"inputPort","portName":"inTables","portIndex":0}}],"contentType":"embedded"}}},"id-1733652457549-27533":{"nodeType":"step","version":1,"id":"id-1733652457549-27533","name":"Random forest","note":{"version":1,"id":"id-1733652457555-27541","name":null,"description":null,"properties":{"UI_NOTE_PROP_IS_EXPANDED":"false","UI_NOTE_PROP_HEIGHT":"0","UI_NOTE_PROP_WIDTH":"0","UI_NOTE_PROP_IS_STICKYNOTE":"false"}},"priority":2,"properties":{"UI_PROP_XPOS":"736","UI_PROP_YPOS":"67","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"429474fa-6420-423b-bdb7-bd3546054290|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"930f041f-d0fc-4fe2-902f-40df1981d357|Output table 1|Output tables","UI_PROP_NODE_DATA_ID":"a7190700-f59c-4a94-afe2-214ce639fcde","UI_PROP_NODE_DATA_MODIFIED_DATE":"1721912191502"},"portMappings":[{"mappingType":"tableStructure","portName":"outTables","portIndex":0,"tableStructure":{"columnDefinitions":[]}}],"stepReference":{"type":"uri","path":"/dataFlows/steps/a7190700-f59c-4a94-afe2-214ce639fcde"},"arguments":{"codeOptions":{"code":"proc forest data=MYCAS.DATA_FS_CA_5D;\n\tpartition role=Selected (test='0');\n\ttarget y / level=nominal;\n\tinput A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63 / level=interval;\n\tgrow gini;\n\tscore out=MYCAS.OUTPUT_RES copyvars=(y A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63);\nrun;\n\ndata output_res;\n\tset mycas.output_res;\n\ty_pred = input(compress(I_y), 3.);\nrun;\n\n%score(output_res, y, y_pred);","logHTML":"","resultsHTML":"","variables":[{"name":"_output1","value":{"referenceType":"outputPort","portName":"outTables","portIndex":0,"arguments":{}}},{"name":"_input1","value":{"referenceType":"inputPort","portName":"inTables","portIndex":0}}],"contentType":"embedded"}}},"id-1733652457626-27595":{"nodeType":"step","version":1,"id":"id-1733652457626-27595","name":"Neural network","note":{"version":1,"id":"id-1733652457630-27603","name":null,"description":null,"properties":{"UI_NOTE_PROP_IS_EXPANDED":"false","UI_NOTE_PROP_HEIGHT":"0","UI_NOTE_PROP_WIDTH":"0","UI_NOTE_PROP_IS_STICKYNOTE":"false"}},"priority":3,"properties":{"UI_PROP_XPOS":"1049","UI_PROP_YPOS":"78","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"092809e6-5bf2-47eb-bb55-e4594e9d7bb9|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"539e741c-2e3e-4d4d-8556-9fc4014ac6e0|Output table 1|Output tables","UI_PROP_NODE_DATA_ID":"a7190700-f59c-4a94-afe2-214ce639fcde","UI_PROP_NODE_DATA_MODIFIED_DATE":"1721912191502"},"portMappings":[{"mappingType":"tableStructure","portName":"outTables","portIndex":0,"tableStructure":{"columnDefinitions":[]}}],"stepReference":{"type":"uri","path":"/dataFlows/steps/a7190700-f59c-4a94-afe2-214ce639fcde"},"arguments":{"codeOptions":{"code":"libname _tmpcas_ cas caslib=\"CASUSER\";\n\nproc nnet data=MYCAS.DATA_FS_CA_5D;\n\tpartition role=Selected (validate='0');\n\ttarget y / level=nominal;\n\tinput A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63 / level=interval;\n\thidden 50;\n\thidden 50 / act=logistic;\n\ttrain stagnation=5 outmodel=_tmpcas_._Nnet_model_;\n\toptimization algorithm=sgd regL2=0.1 minibatchsize=50;\n\tscore out=MYCAS.OUTPUT_RES copyvars=(y A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63 \n\t\tSelected);\nrun;\n\nproc delete data=_tmpcas_._Nnet_model_;\nrun;\n\nlibname _tmpcas_;\n\ndata output_res;\n\tset mycas.output_res;\n\ty_pred = input(compress(I_y), 3.);\nrun;\n\n%score(output_res, y, y_pred);","logHTML":"","resultsHTML":"","variables":[{"name":"_output1","value":{"referenceType":"outputPort","portName":"outTables","portIndex":0,"arguments":{}}},{"name":"_input1","value":{"referenceType":"inputPort","portName":"inTables","portIndex":0}}],"contentType":"embedded"}}},"id-1733652457516-27502":{"nodeType":"step","version":1,"id":"id-1733652457516-27502","name":"Decision tree","note":{"version":1,"id":"id-1733652457520-27510","name":null,"description":null,"properties":{"UI_NOTE_PROP_IS_EXPANDED":"false","UI_NOTE_PROP_HEIGHT":"0","UI_NOTE_PROP_WIDTH":"0","UI_NOTE_PROP_IS_STICKYNOTE":"false"}},"priority":4,"properties":{"UI_PROP_XPOS":"534","UI_PROP_YPOS":"95","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"a446f119-f371-42d6-9996-df6da328d306|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"b643c6b5-0bc6-4563-b989-6f3f5cfe0273|Output table 1|Output tables","UI_PROP_NODE_DATA_ID":"a7190700-f59c-4a94-afe2-214ce639fcde","UI_PROP_NODE_DATA_MODIFIED_DATE":"1721912191502"},"portMappings":[{"mappingType":"tableStructure","portName":"outTables","portIndex":0,"tableStructure":{"columnDefinitions":[]}}],"stepReference":{"type":"uri","path":"/dataFlows/steps/a7190700-f59c-4a94-afe2-214ce639fcde"},"arguments":{"codeOptions":{"code":"proc treesplit data=MYCAS.DATA_FS_CA_5D maxdepth=10;\n\tpartition role=Selected (test='0');\n\tinput A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63 / level=interval;\n\ttarget y / level=nominal;\n\tgrow gini;\n\tprune c45;\n\tscore out=MYCAS.OUTPUT_RES copyvars=(y A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63);\nrun;\n\ndata output_res;\n\tset mycas.output_res;\n\ty_pred = input(compress(I_y), 3.);\nrun;\n\n%score(output_res, y, y_pred);","logHTML":"","resultsHTML":"","variables":[{"name":"_output1","value":{"referenceType":"outputPort","portName":"outTables","portIndex":0,"arguments":{}}},{"name":"_input1","value":{"referenceType":"inputPort","portName":"inTables","portIndex":0}}],"contentType":"embedded"}}},"id-1733596955263-27753":{"nodeType":"step","version":1,"id":"id-1733596955263-27753","name":"Logistic regression","note":{"version":1,"id":"id-1733596955273-27761","name":null,"description":null,"properties":{"UI_NOTE_PROP_IS_EXPANDED":"false","UI_NOTE_PROP_HEIGHT":"0","UI_NOTE_PROP_WIDTH":"0","UI_NOTE_PROP_IS_STICKYNOTE":"false"}},"priority":5,"properties":{"UI_PROP_XPOS":"360","UI_PROP_YPOS":"107","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"e75433f1-0788-4d5e-b290-d2796cdd3ecf|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"7060dbfc-685f-4b45-8ba0-3c43a0aac531|Output table 1|Output tables","UI_PROP_NODE_DATA_ID":"a7190700-f59c-4a94-afe2-214ce639fcde","UI_PROP_NODE_DATA_MODIFIED_DATE":"1721912191502"},"portMappings":[{"mappingType":"tableStructure","portName":"outTables","portIndex":0,"tableStructure":{"columnDefinitions":[]}}],"stepReference":{"type":"uri","path":"/dataFlows/steps/a7190700-f59c-4a94-afe2-214ce639fcde"},"arguments":{"codeOptions":{"code":"proc logselect data=MYCAS.DATA_FS_CA_5D;\n\tpartition role=Selected (test='0');\n\tmodel y(event='1')=A1 A4 A6 A9 A15 A17 A20 A21 A23 A27 A30 A36 A37 A41 A44 A45 \n\t\tA49 A50 A51 A53 A54 A56 A58 A59 A60 A61 A63 / link=logit;\n\tselection method=stepwise\n (select=aic stop=aic choose=aic) hierarchy=none;\n\toutput out=MYCAS.OUTPUT_RES xbeta predicted lower upper copyvars=(_all_);\nrun;\n\ndata output_res;\n\tset mycas.output_res;\n\twhere selected eq 0;\n\tif _pred_ ge 0.5 then y_pred = 1;\n\telse y_pred = 0;\nrun;\n\n%score(output_res, y, y_pred);","logHTML":"","resultsHTML":"","variables":[{"name":"_output1","value":{"referenceType":"outputPort","portName":"outTables","portIndex":0,"arguments":{}}},{"name":"_input1","value":{"referenceType":"inputPort","portName":"inTables","portIndex":0}}],"contentType":"embedded"}}}},"parameters":{},"connections":[],"extendedProperties":{},"stickyNotes":[]}