%MACRO modeleBoost (table =, out = work._coeff, test =, outTest =) ; %LOCAL test ; ODS LISTING CLOSE ; ODS OUTPUT linearDiscFunc = &out ; /* coefficients */ PROC DISCRIM DATA = &table TESTDATA = &test TESTOUT = &outTest ; CLASS good_bad ; VAR age puiss anc_veh ; WEIGHT numberHits ; RUN ; ODS LISTING ; /* transform coefficients for PROC SCORE */ DATA &out (DROP = label _0 _1 RENAME = (variable = _NAME_)); LENGTH variable $32 ; SET &out ; temp = _1 - _0 ; IF variable = "Constant" THEN variable = "Intercept" ; _model_ = "_score_" ; _type_ = "PARMS" ; RUN ; PROC TRANSPOSE DATA = &out OUT = &out (DROP = _NAME_); VAR temp ; BY _model_ _type_ ; RUN ; /* normalize prediction for boosting weighting */ PROC SQL ; CREATE TABLE &outTest AS SELECT *, (_1 - _0 - MIN(_1 - _0)) / (MAX(_1 - _0) - MIN(_1 - _0)) AS _disc_, ABS(good_bad - CALCULATED _disc_) AS error FROM &outTest ; QUIT ; %MEND modeleBoost ;