Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

HP Forest in SAS EMiner

Reply
Occasional Contributor
Posts: 15

HP Forest in SAS EMiner

Hello,

 

I connected a HP Forest node to my dataset. But when i ran the HP Forest node I got a message to say error encoutered. My target is binary and set as interval in the variables properties. Please find error log below. 

 

Please can anyone help and let me know how I can resolve the issue?

 

Thanks

Dee

 

*------------------------------------------------------------*

User:                user

Date:                09 August 2017

Time:                12:48:20 o'clock

Site:                70163641

Platform:            X64_8HOME

Maintenance Release: 9.04.01M1P120413

EM Version:          13.1

*

*------------------------------------------------------------*

* Training Log

Date:                09 August 2017

Time:                12:48:12 o'clock

*------------------------------------------------------------*

14542  proc freq data=EMWS1.HPDMForest_VariableSet noprint;

14543  table ROLE*LEVEL/out=WORK.HPDMForestMETA;

14544  run;

 

NOTE: There were 32 observations read from the data set EMWS1.HPDMFOREST_VARIABLESET.

NOTE: The data set WORK.HPDMFORESTMETA has 5 observations and 4 variables.

NOTE: PROCEDURE FREQ used (Total process time):

      real time           0.15 seconds

      cpu time            0.04 seconds

 

 

14545  proc print data=WORK.HPDMForestMETA label noobs;

14546  var ROLE LEVEL COUNT;

14547  label ROLE = "%sysfunc(sasmsg(sashelp.dmine, meta_role_vlabel, NOQUOTE))" LEVEL = "%sysfunc(sasmsg(sashelp.dmine, meta_level_vlabel, NOQUOTE))" COUNT = "%sysfunc(sasmsg(sashelp.dmine, rpt_count_vlabel, NOQUOTE))";

14548  title9 ' ';

14549  title10 "%sysfunc(sasmsg(sashelp.dmine, rpt_varSummary_title  , NOQUOTE))";

14550  run;

 

NOTE: There were 5 observations read from the data set WORK.HPDMFORESTMETA.

NOTE: The PROCEDURE PRINT printed page 1.

NOTE: PROCEDURE PRINT used (Total process time):

      real time           0.02 seconds

      cpu time            0.03 seconds

 

 

14551  title10;

 

14552  %let EMNORLEN = %DMNORLEN;

EMWS1.FIMPORT5_train EMWS1.FIMPORT5_train

EMWS1.FIMPORT5_train EMWS1.FIMPORT5_train EMWS1 FIMPORT5_train

EMWS1.FIMPORT5_train EMWS1.FIMPORT5_train

EMWS1.FIMPORT5_train EMWS1.FIMPORT5_train EMWS1 FIMPORT5_train

>>>>>>>>>>>>>> TARGET(   NAME='SurvivalPeriodYears'

                         ROLE='TARGET'

                         LEVEL='INTERVAL'

                         ORDER=''

                         CREATOR=''

                         FORMATTYPE='QUANTITY'

                         FAMILY=''

                         LOWERLIMIT=.

                         UPPERLIMIT=.

                         REPORT='N'

                         DISTRIBUTION=''

                         COMMENT=''

                         PRICE=.

                         TYPE='N'

                         LABEL=''

                         FORMAT='BEST12.0'

                         INFORMAT='BEST32.0'

                         INDEX='N'

                         INDEXTYPE='NONE'

                         LENGTH=8

                         USE='Y'

                      )[11377]

PERFORMANCE  DETAILS

WORK.EM_DMDB WORK.EM_DMDB

WORK.EM_DMDB WORK.EM_DMDB WORK EM_DMDB

"No decisions defined for target "SurvivalPeriodYears"."

14613  proc print data = EMWS1.HPDMForest_SurvivalPeriodYe_DM noobs label;

14614  var _type_ variable label;

14615  where _type_ ^in('MATRIX', 'DECISION', 'TRAINPRIOR', 'DATAPRIOR', 'DECPRIOR');

14616  label _TYPE_ = "%sysfunc(sasmsg(sashelp.dmine, rpt_type_vlabel,     NOQUOTE))" VARIABLE = "%sysfunc(sasmsg(sashelp.dmine, rpt_variable_vlabel, NOQUOTE))" LABEL = "%sysfunc(sasmsg(sashelp.dmine, meta_label_vlabel, NOQUOTE))";

14617  title9 ' ';

14618  title10 "%sysfunc(sasmsg(sashelp.dmine, rpt_predDecVars_title  , NOQUOTE))";

14619  run;

 

NOTE: There were 3 observations read from the data set EMWS1.HPDMFOREST_SURVIVALPERIODYE_DM.

      WHERE _type_ not in ('DATAPRIOR', 'DECISION', 'DECPRIOR', 'MATRIX', 'TRAINPRIOR');

NOTE: The PROCEDURE PRINT printed page 2.

NOTE: PROCEDURE PRINT used (Total process time):

      real time           0.00 seconds

      cpu time            0.01 seconds

 

 

14620  title10;

 

14621  %let EMEXCEPTIONSTRING=;

15054  *------------------------------------------------------------*;

15055  * HPDMForest: Generation of macros and macro variables;

15056  * To see the code generated, set the EM_DEBUG macro variable to SOURCE or _ALL_;

15057  *------------------------------------------------------------*;

 

15058  %let EMEXCEPTIONSTRING=;

15059  *------------------------------------------------------------*;

15060  * TRAIN: HPDMForest;

15061  *------------------------------------------------------------*;

15062  %let EM_ACTION = TRAIN;

15063  %let syscc = 0;

15064  %macro main;

15065

15066     %if %upcase(&EM_ACTION) = CREATE %then %do;

15067         filename temp catalog 'sashelp.hpdm.hpdmforest_create.source';

15068         %include temp;

15069         filename temp;

15070         %hpdm_Forest_create;

15071     %end;

15072     %else

15073     %if %upcase(&EM_ACTION) = TRAIN %then %do;

15074         filename temp catalog 'sashelp.hpdm.hpdmforest_train.source';

15075         %include temp;

15076         filename temp;

15077         %hpdm_Forest_train;

15078     %end;

15079     %else

15080     %if %upcase(&EM_ACTION) = SCORE %then %do;

15081         filename temp catalog 'sashelp.hpdm.hpdmforest_score.source';

15082         %include temp;

15083         filename temp;

15084         %hpdm_Forest_score;

15085     %end;

15086     %else

15087     %if %upcase(&EM_ACTION) = REPORT %then %do;

15088         filename temp catalog 'sashelp.hpdm.hpdmforest_report.source';

15089         %include temp;

15090         filename temp;

15091         %hpdm_Forest_report;

15092     %end;

15093     %else

15094

15095  %mend main;

15096

15097  %main;

NOTE: %INCLUDE (level 1) file TEMP is file SASHELP.HPDM.HPDMFOREST_TRAIN.SOURCE.

15098 +%Macro hpdm_Forest_Train;

15100 +   /* retrieve data to model based on presence of grid processing */

15101 +   %em_getname(key=HPDS2SCORE, type=FILE, extension=sas);

15102 +   %hpdm_dataprep(data=, out=, metadata=, code=, ROLE=TRAIN, where=,

15103 +        outDS2Code=&em_user_HPDS2SCORE, append=N, host=, nodes=, nthreads=, details=);

15105 +   /* check for the existence of EM_HPDM_TRAIN table */

15106 +   %if &EM_HPDM_TRAIN eq  %then %do;

15107 +       %let EMEXCEPTIONSTRING = exception.server.IMPORT.NOTRAIN,1;

15108 +       %put &em_codebar;

15109 +       %let errormsg = %sysfunc(sasmsg(sashelp.dmine, error_nodeTrainRawData_note, NOQUOTE));

15110 +       %put &errormsg;

15111 +       %put &em_codebar;

15112 +       %goto doendm;

15113 +   %end;

15114 +   %else

15115 +       %let EMEXCEPTIONSTRING =;

15117 +   %if ^%sysfunc(exist(&EM_HPDM_TRAIN)) AND ^%sysfunc(exist(&EM_HPDM_TRAIN, VIEW)) %then %do;

15118 +       %let EMEXCEPTIONSTRING = exception.server.IMPORT.NOTRAIN,1;

15119 +       %put &em_codebar;

15120 +       %let errormsg = %sysfunc(sasmsg(sashelp.dmine, error_nodeTrainRawData_note, NOQUOTE));

15121 +       %put &errormsg;

15122 +       %put &em_codebar;

15123 +       %goto doendm;

15124 +   %end;

15125 +   %else

15126 +       %let EMEXCEPTIONSTRING =;

15129 +   /* Check for the existence of one target variable*/

15130 +   %if  &EM_NUM_TARGET ne 1 %then %do;

15131 +        %let EMEXCEPTIONSTRING = exception.server.USE1TARGET;

15132 +        %put &em_codebar;

15133 +        %let errormsg = %sysfunc(sasmsg(sashelp.dmine, metadata.use01target_err, NOQUOTE));

15134 +        %put &errormsg;

15135 +        %put &em_codebar;

15136 +        %goto doendm;

15137 +   %end;

15138 +   %else

15139 +       %let EMEXCEPTIONSTRING =;

15141 +   /* Check target measurement level and throw exception if ordinal target is detected */

15142 +   %if %EM_TARGET_LEVEL eq ORDINAL %then %do;

15143 +        %let EMEXCEPTIONSTRING = exception.server.METADATA.INVALIDORDINALTARGET;

15144 +        %put &em_codebar;

15145 +        %let errormsg = %sysfunc(sasmsg(sashelp.dmine, ordinaltargetpresent_note, NOQUOTE));

15146 +        %put &errormsg;

15147 +        %put &em_codebar;

15148 +        %goto doendm;

15149 +   %end;

15150 +   %else

15151 +       %let EMEXCEPTIONSTRING =;

15153 +   /* Check for the existence of one input variable*/

15154 +   %if  (&EM_NUM_INTERVAL_INPUT < 1) and (&EM_NUM_BINARY_INPUT < 1) and (&EM_NUM_ORDINAL_INPUT < 1)

15155 +        and (&EM_NUM_NOMINAL_INPUT < 1) %then %do;

15156 +        %let EMEXCEPTIONSTRING = exception.server.USEATLEAST1INPUTREJECT;

15157 +        %put &em_codebar;

15158 +        %let errormsg = %sysfunc(sasmsg(sashelp.dmine, error_noInput_note, NOQUOTE));

15159 +        %put &errormsg;

15160 +        %put &em_codebar;

15161 +        %goto doendm;

15162 +   %end;

15163 +   %else

15164 +       %let EMEXCEPTIONSTRING =;

15166 +   /* data sets */

15167 +   %EM_GETNAME(KEY=ITERATION, type=DATA);

15168 +   %EM_GETNAME(KEY=VARIMPORT, type=DATA);

15169 +   %EM_GETNAME(KEY=BASELINE, type=DATA);

15171 +   %let out=;

15172 +   %if "&em_hpdm_train" ne "&em_import_data" %then %do;

15173 +      %let out = &em_hpdm_train_score;

15174 +   %end;

15176 +    * retrieve the ordering of the target variable from DECMETA;

15177 +    * and use it to determine the event level for non-interval target;

15178 +   %if %EM_TARGET_LEVEL ne INTERVAL %then %do;

15179 +       proc sql noprint;

15180 +           select order into :_target_order from &EM_DEC_DECMETA

15181 +               where upcase(variable) eq "%upcase(%EM_TARGET)";

15182 +       quit;

15183 +   %end;

15184 +   %else %let _target_order =;

15186 +   /* load hpforest macros */

15187 +   filename temp catalog 'sashelp.hpdm.hpdmforest_macros.source';

15188 +   %include temp;

15189 +   filename temp;

15191 +    /* run HPForest model */

15192 +    %HPDM_HPForest(indata=&EM_HPDM_TRAIN,

15193 +           target = %EM_TARGET,

15194 +           targetOrder = &_target_order,

15195 +           alpha=&EM_PROPERTY_ALPHA,

15196 +           catbins=&EM_PROPERTY_CATBINS,

15197 +           exhaustive=&EM_PROPERTY_EXHAUSTIVE,

15198 +           leafsizemethod=&EM_PROPERTY_LEAFSIZEMETHOD,

15199 +           leaffraction=&EM_PROPERTY_LEAFFRACTION,

15200 +           leafsize=&EM_PROPERTY_LEAFSIZE,

15201 +           maxdepth=&EM_PROPERTY_MAXDEPTH,

15202 +           maxtrees=&EM_PROPERTY_MAXTREES,

15203 +           mincatsize=&EM_PROPERTY_MINCATSIZE,

15204 +           seed=&EM_PROPERTY_SEED,

15205 +           splitsize=&EM_PROPERTY_SPLITSIZE,

15206 +           numobsmethod=&EM_PROPERTY_NUMOBSMETHOD,

15207 +           trainfraction=&EM_PROPERTY_TRAINFRACTION,

15208 +           trainn=&EM_PROPERTY_TRAINN,

15209 +           vars_to_try=&EM_PROPERTY_VARS_TO_TRY,

15210 +           missing=&EM_PROPERTY_MISSING,

15211 +           minuseinsearch=&EM_PROPERTY_MINUSEINSEARCH,

15212 +           %if &out ne "" %then %do;

15213 +             out=&out,

15214 +           %end;

15215 +           outbase=&EM_USER_BASELINE,

15216 +           outiter=&EM_USER_ITERATION,

15217 +           outimport=&EM_USER_VARIMPORT

15218 +           );

15220 +    /* create flow and publish score code */

15221 +    filename flowref "&EM_FILE_EMFLOWSCORECODE";

15222 +    filename pubref "&EM_FILE_EMPUBLISHSCORECODE";

15224 +    %em_getname(key=OUTMDLFILE, type=FILE, extension=bin);

15226 +    /* add decision and residual score code; create classification tables and fit statistics on the model */

15227 +    %em_model(DATA=, TARGET=&EM_DEC_TARGET, DECSCORECODE=Y, CLASSIFICATION=Y, FITSTATISTICS=Y, RESIDUALS=Y);

15229 +    %global hpfst_score_input hpfst_score_output;

15230 +    %let hpfst_score_input = &em_score_output;

15231 +    %let hpfst_score_output = &em_score_output;

15233 +    data _null_;

15234 +      file flowref;

15235 +      set &EM_DATA_VARIABLESET(where=((ROLE='INPUT' and USE in('Y', 'D')) or ROLE='REJECTED' and USE='Y')) end=eof;

15237 +      if _n_=1 then do;

15238 +        put '%macro em_hpfst_score;';

15239 +        put ' ';

15241 +        put '  %if %sysfunc(exist(work._score_temp)) %then %do;';

15242 +        put '     proc delete data=work._score_temp;';

15243 +        put '     run;';

15244 +        put '  %end;';

15246 +        put ' ';

15247 +        put '  %if %symexist(hpfst_score_input)=0 %then %let hpfst_score_input=&em_score_output;';

15248 +        put '  %if %symexist(hpfst_score_output)=0 %then %let hpfst_score_output=&em_score_output;';

15249 +        put '  %if %symexist(EM_USER_OUTMDLFILE)=0 %then %let EM_USER_OUTMDLFILE=%bquote(' @;

15250 +        put "&EM_USER_OUTMDLFILE);";

15251 +        put ' ';

15252 +        put '%let hpvvn= %sysfunc(getoption(VALIDVARNAME));';

15253 +        put 'options validvarname=V7;';

15255 +        put '  proc hp4score data=&hpfst_score_input(keep=';

15256 +      end;

15258 +      /* only keeps variables used as input */

15259 +      put NAME;

15261 +      if eof then do;

15262 +        put " %EM_KEY ); ";

15264 +        %if &EM_NUM_KEY  %then %do;

15265 +          put "  ID %EM_KEY ;";

15266 +        %end;

15267 +        put '    score file="&EM_USER_OUTMDLFILE" out=work._outtemp;';

15268 +        put "    &hpdm_performance nthreads=1;";

15269 +        put "  run;";

15270 +        put " ";

15271 +        put 'options validvarname=&hpvvn;';

15272 +        put '  data work._score_temp;';

15273 +        put '     merge &hpfst_score_input work._outtemp;';

15274 +        put "  run;";

15275 +        put " ";

15276 +        put "  proc delete data=work._outtemp;";

15277 +        put "  run;";

15278 +        put " ";

15279 +        put '  data &hpfst_score_output;';

15280 +        put '    set work._score_temp;';

15281 +        put '%mend;';

15282 +        put ' ';

15283 +        put '%em_hpfst_score;';

15284 +      end;

15285 +    run;

15287 +    %em_copyfile(infref=flowref, outfref=pubref, append=N);

15288 +    filename pubref;

15289 +    filename flowref;

15291 +    %if "&out" ne "" %then %do;

15292 +      %hpdm_node_assess(data=&out, DECMETA=&EM_DEC_DECMETA);

15293 +      proc delete data=&out;run;

15294 +    %end;

15296 +    %if &sysrc >4 %then %do;

15297 +      %goto doendem;

15298 +    %end;

15300 +    %doendem:

15302 +%Mend hpdm_Forest_Train;

NOTE: %INCLUDE (level 1) ending.

NOTE: Fileref TEMP has been deassigned.

NOTE: %INCLUDE (level 1) file _HPFLOW is file SASHELP.EMUTIL.EM_PATHSCORECODE.SOURCE.

15306 +%macro EM_PATHSCORECODE(NODEID=, STARTNODEID=, FLOW=, PUBLISH=, HPDM=, OUTPATH=);

15307 +   proc display c=sashelp.emcore.pathscorecode.scl;

15308 +   run;

15309 +%mend EM_PATHSCORECODE;

15310 +

NOTE: %INCLUDE (level 1) ending.

NOTE: Fileref _HPFLOW has been deassigned.

Note: No data preparation was done because the table for this role is unavailable.

Note: No data preparation was done because the table for this role does not exist.

NOTE: %INCLUDE (level 1) file TEMP is file SASHELP.HPDM.HPDMFOREST_MACROS.SOURCE.

15312 +%macro HPDM_HPFOREST(indata=,

15313 +                   target=,

15314 +                   targetOrder=,

15315 +                   alpha=,

15316 +                   catbins=,

15317 +                   exhaustive=,

15318 +                   leafsizemethod=,

15319 +                   leaffraction=,

15320 +                   leafsize=,

15321 +                   maxdepth=,

15322 +                   maxtrees=,

15323 +                   mincatsize=,

15324 +                   seed=,

15325 +                   splitsize=,

15326 +                   numobsmethod=,

15327 +                   trainfraction=,

15328 +                   trainn=,

15329 +                   vars_to_try=,

15330 +                   missing=,

15331 +                   minuseinsearch=,

15332 +                   out=,

15333 +                   outbase=,

15334 +                   outiter=,

15335 +                   outimport=

15336 +                   );

15338 +    /* retrieve files */

15339 +    %em_getname(key=OUTMDLFILE, type=FILE, extension=bin);

15341 +    /* run the HPForest procedure */

15342 +    proc hpforest data=&indata

15343 +    %if "&hpdm_partitionvar" ne "" %then %do;

15344 +      (where=(_partind_=1))

15345 +    %end;

15347 +    /* HPForest arguments */

15348 +    %if &alpha ne %then %do;

15349 +      alpha=&alpha

15350 +    %end;

15351 +    %if &catbins ne %then %do;

15352 +      catbins=&catbins

15353 +    %end;

15354 +    %if &exhaustive ne %then %do;

15355 +      exhaustive=&exhaustive

15356 +    %end;

15357 +    %if &leafsizemethod ne DEFAULT %then %do;

15358 +      %if ((&leafsizemethod eq PERCENTAGE) and ("&leaffraction" ne ".")) %then %do;

15359 +        leaffraction=&leaffraction

15360 +      %end;

15361 +      %else %if ((&leafsizemethod eq COUNT) and ("&leafsize" ne ".")) %then %do;

15362 +        leafsize=&leafsize

15363 +      %end;

15364 +    %end;

15365 +    %if &maxdepth ne %then %do;

15366 +      maxdepth=&maxdepth

15367 +    %end;

15368 +    %if &maxtrees ne %then %do;

15369 +      maxtrees=&maxtrees

15370 +    %end;

15371 +    %if &mincatsize ne %then %do;

15372 +      mincatsize=&mincatsize

15373 +    %end;

15374 +    %if &missing ne %then %do;

15375 +      missing=&missing

15376 +      %if ((&missing eq USEINSEARCH) AND (&minuseinsearch ne )) %then %do;

15377 +         minUseInSearch=&minuseinsearch

15378 +      %end;

15379 +    %end;

15380 +    %if &seed ne %then %do;

15381 +      seed=&seed

15382 +    %end;

15383 +    %if ((&splitsize ne) and ("&splitsize" ne ".")) %then %do;

15384 +      splitsize=&splitsize

15385 +    %end;

15386 +    %if ((&numobsmethod eq PERCENTAGE) and ("&trainfraction" ne ".")) %then %do;

15387 +      trainfraction = &trainfraction

15388 +    %end;

15389 +    %else %if ((&numobsmethod eq COUNT) and ("&trainn" ne ".")) %then %do;

15390 +       trainn = &trainn

15391 +    %end;

15392 +    %if ((&vars_to_try ne ) and ("&vars_to_try" ne ".")) %then %do;

15393 +       vars_to_try=&vars_to_try

15394 +    %end;

15395 +    %if %symexist(EM_HPFOREST_PROCSTMNT) %then %do;

15396 +       &EM_HPFOREST_PROCSTMNT

15397 +    %end;

15398 +    ;

15400 +    /* Input Statements */

15401 +    %if %EM_INTERVAL_INPUT %EM_INTERVAL_REJECTED ne %then %do;

15402 +      input %EM_INTERVAL_INPUT %EM_INTERVAL_REJECTED/ level = interval;

15403 +    %end;

15405 +    %if %EM_BINARY_INPUT %EM_NOMINAL_INPUT %EM_BINARY_REJECTED %EM_NOMINAL_REJECTED ne  %then %do;

15406 +      input %EM_BINARY_INPUT %EM_BINARY_REJECTED %EM_NOMINAL_INPUT %EM_NOMINAL_REJECTED / level = nominal;

15407 +    %end;

15409 +    %if %EM_ORDINAL_INPUT %EM_ORDINAL_REJECTED ne %then %do;

15410 +      input %EM_ORDINAL_INPUT %EM_ORDINAL_REJECTED / level = ordinal;

15411 +    %end;

15413 +    /* Target Statement */

15414 +    * for the ordering of target levels;

15415 +    * if not ASC, FMTASC, or FMTDESC then alway use DESC;

15416 +    %if %EM_TARGET_LEVEL ne INTERVAL %then %do;

15417 +       %if &targetOrder eq ASC %then %let torder = %str(order = ASCENDING);

15418 +       %else %if &targetOrder eq FMTASC %then %let torder = %str(order = ASCFORMATTED);

15419 +       %else %if &targetOrder eq FMTDESC %then %let torder = %str(order = DESFORMATTED);

15420 +       %else %let torder = %str(order = DESCENDING);

15421 +    %end;

15422 +    %else %let torder=;

15424 +    target &Target / level = %EM_TARGET_LEVEL &torder;

15426 +    /* ID Variables */

15427 +    %if ("&hpdm_partitionVar" ne "") %then %do;

15428 +        id &hpdm_partitionVar %em_key ;

15429 +    %end;

15430 +    %else

15431 +    %if &EM_NUM_KEY  %then %do;

15432 +       ID %EM_KEY ;

15433 +    %end;

15435 +    /* freq variable */

15436 +    %if %EM_FREQ ne %then %do;

15437 +      freq %EM_FREQ;

15438 +    %end;

15440 +    /* output statements */

15441 +    /*ods output nobs=&outnobs Baseline=&outbase FitStatistics=&outiter ModelInfo=&outmodelparms timing=&outtiming VariableImportance=&outimport; */

15442 +    ods output Baseline=&outbase FitStatistics=&outiter VariableImportance=&outimport;

15445 +    /* Score Statement

15446 +    %if "&out" ne "" %then %do;

15447 +      score out=&out

15448 +      %if %symexist(EM_HPFOREST_SCORESTMNT) %then %do;

15449 +        &EM_HPFOREST_SCORESTMNT

15450 +      %end;

15451 +      ;

15452 +    %end;

15453 +    */

15455 +    /* save statement */

15456 +    save file="&EM_USER_OUTMDLFILE"

15457 +    %if %symexist(EM_HPFOREST_SAVESTMNT) %then %do;

15458 +      &EM_HPFOREST_SAVESTMNT

15459 +    %end;

15460 +    ;

15462 +    /* Performance Statements */

15463 +    &hpdm_performance

15464 +    %if %symexist(EM_HPFOREST_PERFSTMNT) %then %do;

15465 +      &EM_HPFOREST_PERFSTMNT

15466 +    %end;

15467 +    ;

15468 +    run;

15469 +    quit;

15471 +    /* until the partition statement is supported, only training data is passed to hpforest; */

15472 +    /* therefore scoring on the grid must be done via hp4score vs score statement.           */

15473 +    /* when partition statment is supported, this can be removed and score statement used instead */

15474 +    %if "&out" ne "" %then %do;

15475 +      proc hp4score data=&indata;

15476 +      id %EM_TARGET

15477 +      %if ("&hpdm_partitionVar" ne "") %then %do;

15478 +           &hpdm_partitionVar %em_key

15479 +      %end;

15480 +      %else

15481 +      %if &EM_NUM_KEY  %then %do;

15482 +          %EM_KEY

15483 +      %end;

15484 +      ;

15485 +        score file="&EM_USER_OUTMDLFILE" out=&out;

15486 +        &hpdm_performance;

15487 +      run;

15488 +    %end;

15491 +%mend HPDM_HPFOREST;

NOTE: %INCLUDE (level 1) ending.

NOTE: Fileref TEMP has been deassigned.

 

NOTE: The HPFOREST procedure is executing in single-machine mode.

ERROR: Internal Error: ABNORMAL return ignored.

NOTE: Traceback: line  6850 in file /sas/wky/mva-v940m1/tkaasubs/src/spkvset.c.

NOTE: View EMWS1.FIMPORT5_TRAIN.VIEW used (Total process time):

      real time           0.04 seconds

      cpu time            0.04 seconds

 

NOTE: There were 859 observations read from the data set EMWS1.FIMPORT5_DATA.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: There were 859 observations read from the data set EMWS1.FIMPORT5_TRAIN.

NOTE: PROCEDURE HPFOREST used (Total process time):

      real time           0.06 seconds

      cpu time            0.06 seconds

 

WARNING: Output 'VariableImportance' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, verify that the appropriate procedure options are used to produce the requested output object.  For example, verify

         that the NOPRINT option is not used.

WARNING: Output 'FitStatistics' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that

         the NOPRINT option is not used.

WARNING: Output 'Baseline' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that the

         NOPRINT option is not used.

 

 

 

NOTE: The data set WORK.EM_USER_MODEL has 1 observations and 8 variables.

NOTE: DATA statement used (Total process time):

      real time           0.00 seconds

      cpu time            0.01 seconds

 

 

WARNING: Apparent symbolic reference EM_SCORE_OUTPUT not resolved.

WARNING: Apparent symbolic reference EM_SCORE_OUTPUT not resolved.

 

NOTE: The file FLOWREF is:

      Filename=C:\Users\user\Documents\Dissertation\SAS\Dissertation\Workspaces\EMWS1\HPDMForest\EMFLOWSCORE.sas,

      RECFM=V,LRECL=32767,File Size (bytes)=0,

      Last Modified=09 August 2017 12:48:19 o'cloc,

      Create Time=09 August 2017 12:43:21 o'cloc

 

NOTE: 59 records were written to the file FLOWREF.

      The minimum record length was 1.

      The maximum record length was 174.

NOTE: There were 27 observations read from the data set EMWS1.HPDMFOREST_VARIABLESET.

      WHERE ((ROLE='INPUT') and USE in ('D', 'Y')) or ((ROLE='REJECTED') and (USE='Y'));

NOTE: DATA statement used (Total process time):

      real time           0.02 seconds

      cpu time            0.01 seconds

 

 

 

NOTE: The file PUBREF is:

      Filename=C:\Users\user\Documents\Dissertation\SAS\Dissertation\Workspaces\EMWS1\HPDMForest\EMPUBLISHSCORE.sas,

      RECFM=V,LRECL=20000,File Size (bytes)=0,

      Last Modified=09 August 2017 12:48:19 o'cloc,

      Create Time=09 August 2017 12:43:21 o'cloc

 

NOTE: 59 records were written to the file PUBREF.

      The minimum record length was 1.

      The maximum record length was 174.

NOTE: DATA statement used (Total process time):

      real time           0.01 seconds

      cpu time            0.01 seconds

 

 

NOTE: Fileref PUBREF has been deassigned.

NOTE: Fileref FLOWREF has been deassigned.

15493

15494  *------------------------------------------------------------*;

15495  * End TRAIN: HPDMForest;

15496  *------------------------------------------------------------*;

 

*------------------------------------------------------------*

*

* ERROR: Run time error was encountered.  The system error returned was 1012.

* Please report unresolved problems to Technical Support.

*

*------------------------------------------------------------*

SAS Employee
Posts: 180

Re: HP Forest in SAS EMiner

[ Edited ]

When reviewing logs from SAS Enterprise Miner, search for a line beginning with "ERROR:" to begin your investigation.  In your log, it has the following:

ERROR: Internal Error: ABNORMAL return ignored.

 

Although this error message is not particularly informative, we have seen this error message in situations where one or more variables had had all missing values (or too many missing values).   To automatically screen for too-many missing values, try adding an HP Variable Selection node to your flow. Variables with all missing values are dropped because they have no association to the target. You can also specify values for these properties to automatically reject variables that have too many missing values.

  * Maximum Missing Percent
  * Specifies the maximum percent for missing values

 

I hope this helps!

Doug

Occasional Contributor
Posts: 15

Re: HP Forest in SAS EMiner

Posted in reply to DougWielenga

Thank you so much. Will try it out.

Ask a Question
Discussion stats
  • 2 replies
  • 153 views
  • 0 likes
  • 2 in conversation