-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_3_FEATURE_SELECTION.flw
executable file
·1 lines (1 loc) · 11.9 KB
/
2_3_FEATURE_SELECTION.flw
1
{"creationTimeStamp":null,"modifiedTimeStamp":null,"createdBy":null,"modifiedBy":null,"version":2,"id":null,"name":"2_3_FEATURE_SELECTION.flw","description":null,"properties":{"UI_PROP_DF_OPTIMIZE":"false","UI_PROP_DF_ID":"a04c91c5-3508-491c-961e-15b330115ccf","UI_PROP_DF_EXECUTION_ORDERED":"false"},"links":[],"nodes":{"id-1733650159743-22577":{"nodeType":"step","version":1,"id":"id-1733650159743-22577","name":"Gradient boosting","note":{"version":1,"id":"id-1733650159747-22585","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":"887","UI_PROP_YPOS":"-27","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"ad74c7e8-c4f8-45c1-a864-30da6d3ad58a|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"f6c5d95d-df74-4f2d-a9a2-67888474baa9|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_RF_5C;\n\tpartition role=Selected (test='0');\n\ttarget y / level=nominal;\n\tinput A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61 / level=interval;\n\tscore out=MYCAS.OUTPUT_RES copyvars=(y A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61);\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-1733650159719-22546":{"nodeType":"step","version":1,"id":"id-1733650159719-22546","name":"Random forest","note":{"version":1,"id":"id-1733650159723-22554","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":"694","UI_PROP_YPOS":"-14","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"dc37babb-cb76-48e0-b16b-21aa62ab0a72|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"049983fa-8d6d-441b-9c02-191e205c1a77|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_RF_5C;\n\tpartition role=Selected (test='0');\n\ttarget y / level=nominal;\n\tinput A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61 / level=interval;\n\tgrow gini;\n\tscore out=MYCAS.OUTPUT_RES copyvars=(y A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61);\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-1733650159764-22608":{"nodeType":"step","version":1,"id":"id-1733650159764-22608","name":"Neural network","note":{"version":1,"id":"id-1733650159767-22616","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":"1007","UI_PROP_YPOS":"-3","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"ee56790e-445a-43d1-8797-7b76eefcf63d|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"8ab38f71-030a-4f8f-a85d-0a4ebb5ae98b|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_RF_5C;\n\tpartition role=Selected (validate='0');\n\ttarget y / level=nominal;\n\tinput A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61 / 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 A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61 \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-1733650159694-22515":{"nodeType":"step","version":1,"id":"id-1733650159694-22515","name":"Decision tree","note":{"version":1,"id":"id-1733650159699-22523","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":"492","UI_PROP_YPOS":"13","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"ec1171ff-10cd-4d97-a6a5-1838cad8f1cb|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"cda0096a-ab04-4217-b9f1-57410ded63c7|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_RF_5C maxdepth=10;\n\tpartition role=Selected (test='0');\n\tinput A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61 / level=interval;\n\ttarget y / level=nominal;\n\tgrow gini;\n\tprune c45;\n\tscore out=MYCAS.OUTPUT_RES copyvars=(y A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61);\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-1733596422094-24748":{"nodeType":"step","version":1,"id":"id-1733596422094-24748","name":"Logistic regression","note":{"version":1,"id":"id-1733596422097-24756","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":"285","UI_PROP_YPOS":"37","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"3afb683a-56c5-4daf-b9db-1e6772307081|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"171ca018-1d5e-4c3e-9ebb-d564353a6390|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_RF_5C;\n\tpartition role=Selected (test='0');\n\tmodel y(event='1')=A5 A6 A9 A11 A13 A16 A21 A22 A24 A26 A27 A29 A34 A35 A36 A39 A40 A41 A42 \n\t\tA44 A46 A47 A55 A56 A58 A61 / 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"}}},"id-1731617038914-1271":{"nodeType":"step","version":1,"id":"id-1731617038914-1271","name":"Train-test split","note":{"version":1,"id":"id-1731617038915-1275","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":"97","UI_PROP_YPOS":"51","UI_PROP_COLORGRP":"0","UI_PROP_IS_INPUT_EXPANDED":"false","UI_PROP_IS_OUTPUT_EXPANDED":"false","UI_PROP_INPUT_PORT|inTables|0":"98535ff0-4415-4d55-be48-708de1b1f5a7|Input table 1|Input tables","UI_PROP_OUTPUT_PORT|outTables|0":"5a74fa1e-7065-4e80-91f3-8830ed7c1511|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_RF_5C rate=0.7 outall out=DATA_FS_RF_5C 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_RF_5C' 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_RF_5C 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_RF_5C casout=\"DATA_FS_RF_5C\" 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"}}}},"parameters":{},"connections":[],"extendedProperties":{},"stickyNotes":[]}