def assessModel(self, target: str, prediction: str, nominal: bool=True, event: str='', **kwargs):
    '\n        This method will calculate assessment measures using the SAS AA_Model_Eval Macro used for SAS Enterprise Miner.\n        Not all datasets can be assessed. This is designed for scored data that includes a target and prediction columns\n        TODO: add code example of build, score, and then assess\n\n        :param target: string that represents the target variable in the data\n        :param prediction: string that represents the numeric prediction column in the data. For nominal targets this should a probability between (0,1).\n        :param nominal: boolean to indicate if the Target Variable is nominal because the assessment measures are different.\n        :param event: string which indicates which value of the nominal target variable is the event vs non-event\n        :param kwargs:\n        :return: SAS result object\n        '
    self.sas.submit('%aamodel;')
    objtype = 'datastep'
    objname = ('{s:{c}^{n}}'.format(s=self.table[:3], n=3, c='_') + self.sas._objcnt())
    code = '%macro proccall(d);\n'
    score_table = str(((self.libref + '.') + self.table))
    binstats = str(((objname + '.') + 'ASSESSMENTSTATISTICS'))
    out = str(((objname + '.') + 'ASSESSMENTBINSTATISTICS'))
    level = 'interval'
    if nominal:
        level = 'class'
        try:
            if (len(event) < 1):
                raise Exception(event)
        except Exception:
            print('No event was specified for a nominal target. Here are possible options:\n')
            event_code = ('proc hpdmdb data=%s.%s %s classout=work._DMDBCLASSTARGET(keep=name nraw craw level frequency nmisspercent);' % (self.libref, self.table, self._dsopts()))
            event_code += ('\nclass %s ; \nrun;' % target)
            event_code += ("data _null_; set work._DMDBCLASSTARGET; where ^(NRAW eq . and CRAW eq '') and lowcase(name)=lowcase('%s');" % target)
            ec = self.sas._io.submit(event_code)
            HTML(ec['LST'])
    if nominal:
        code += ('%%aa_model_eval(DATA=%s%s, TARGET=%s, VAR=%s, level=%s, BINSTATS=%s, bins=100, out=%s,  EVENT=%s);' % (score_table, self._dsopts(), target, prediction, level, binstats, out, event))
    else:
        code += ('%%aa_model_eval(DATA=%s%s, TARGET=%s, VAR=%s, level=%s, BINSTATS=%s, bins=100, out=%s);' % (score_table, self._dsopts(), target, prediction, level, binstats, out))
    rename_char = '\n        data {0};\n            set {0};\n            if level in ("INTERVAL", "INT") then do;\n                rename  _sse_ = SumSquaredError\n                        _div_ = Divsor\n                        _ASE_ = AverageSquaredError\n                        _RASE_ = RootAverageSquaredError\n                        _MEANP_ = MeanPredictionValue\n                        _STDP_ = StandardDeviationPrediction\n                        _CVP_ = CoefficientVariationPrediction;\n            end;\n            else do;\n                rename  CR = MaxClassificationRate\n                        KSCut = KSCutOff\n                        CRDEPTH =  MaxClassificationDepth\n                        MDepth = MedianClassificationDepth\n                        MCut  = MedianEventDetectionCutOff\n                        CCut = ClassificationCutOff\n                        _misc_ = MisClassificationRate;\n            end;\n        run;\n        '
    code += rename_char.format(binstats)
    if nominal:
        graphics = '\n            ODS PROCLABEL=\'ERRORPLOT\' ;\n            proc sgplot data={0};\n                title "Error and Correct rate by Depth";\n                series x=depth y=correct_rate;\n                series x=depth y=error_rate;\n                yaxis label="Percentage" grid;\n            run;\n            /* roc chart */\n            ODS PROCLABEL=\'ROCPLOT\' ;\n\n            proc sgplot data={0};\n                title "ROC Curve";\n                series x=one_minus_specificity y=sensitivity;\n                yaxis grid;\n            run;\n            /* Lift and Cumulative Lift */\n            ODS PROCLABEL=\'LIFTPLOT\' ;\n            proc sgplot data={0};\n                Title "Lift and Cumulative Lift";\n                series x=depth y=c_lift;\n                series x=depth y=lift;\n                yaxis grid;\n            run;\n            '
        code += graphics.format(out)
    code += 'run; quit; %mend;\n'
    code += ('%%mangobj(%s,%s,%s);' % (objname, objtype, self.table))
    if self.sas.nosub:
        print(code)
        return
    ll = self.sas.submit(code, 'text')
    obj1 = sp2.SASProcCommons._objectmethods(self, objname)
    return sp2.SASresults(obj1, self.sas, objname, self.sas.nosub, ll['LOG'])
This method will calculate assessment measures using the SAS AA_Model_Eval Macro used for SAS Enterprise Miner.
Not all datasets can be assessed. This is designed for scored data that includes a target and prediction columns
TODO: add code example of build, score, and then assess

:param target: string that represents the target variable in the data
:param prediction: string that represents the numeric prediction column in the data. For nominal targets this should a probability between (0,1).
:param nominal: boolean to indicate if the Target Variable is nominal because the assessment measures are different.
:param event: string which indicates which value of the nominal target variable is the event vs non-event
:param kwargs:
:return: SAS result object
def assessModel(self, target: str, prediction: str, nominal: bool=True, event: str=, **kwargs):
    '\n        This method will calculate assessment measures using the SAS AA_Model_Eval Macro used for SAS Enterprise Miner.\n        Not all datasets can be assessed. This is designed for scored data that includes a target and prediction columns\n        TODO: add code example of build, score, and then assess\n\n        :param target: string that represents the target variable in the data\n        :param prediction: string that represents the numeric prediction column in the data. For nominal targets this should a probability between (0,1).\n        :param nominal: boolean to indicate if the Target Variable is nominal because the assessment measures are different.\n        :param event: string which indicates which value of the nominal target variable is the event vs non-event\n        :param kwargs:\n        :return: SAS result object\n        '
    self.sas.submit('%aamodel;')
    objtype = 'datastep'
    objname = ('{s:{c}^{n}}'.format(s=self.table[:3], n=3, c='_') + self.sas._objcnt())
    code = '%macro proccall(d);\n'
    score_table = str(((self.libref + '.') + self.table))
    binstats = str(((objname + '.') + 'ASSESSMENTSTATISTICS'))
    out = str(((objname + '.') + 'ASSESSMENTBINSTATISTICS'))
    level = 'interval'
    if nominal:
        level = 'class'
        try:
            if (len(event) < 1):
                raise Exception(event)
        except Exception:
            print('No event was specified for a nominal target. Here are possible options:\n')
            event_code = ('proc hpdmdb data=%s.%s %s classout=work._DMDBCLASSTARGET(keep=name nraw craw level frequency nmisspercent);' % (self.libref, self.table, self._dsopts()))
            event_code += ('\nclass %s ; \nrun;' % target)
            event_code += ("data _null_; set work._DMDBCLASSTARGET; where ^(NRAW eq . and CRAW eq ) and lowcase(name)=lowcase('%s');" % target)
            ec = self.sas._io.submit(event_code)
            HTML(ec['LST'])
    if nominal:
        code += ('%%aa_model_eval(DATA=%s%s, TARGET=%s, VAR=%s, level=%s, BINSTATS=%s, bins=100, out=%s,  EVENT=%s);' % (score_table, self._dsopts(), target, prediction, level, binstats, out, event))
    else:
        code += ('%%aa_model_eval(DATA=%s%s, TARGET=%s, VAR=%s, level=%s, BINSTATS=%s, bins=100, out=%s);' % (score_table, self._dsopts(), target, prediction, level, binstats, out))
    rename_char = '\n        data {0};\n            set {0};\n            if level in ("INTERVAL", "INT") then do;\n                rename  _sse_ = SumSquaredError\n                        _div_ = Divsor\n                        _ASE_ = AverageSquaredError\n                        _RASE_ = RootAverageSquaredError\n                        _MEANP_ = MeanPredictionValue\n                        _STDP_ = StandardDeviationPrediction\n                        _CVP_ = CoefficientVariationPrediction;\n            end;\n            else do;\n                rename  CR = MaxClassificationRate\n                        KSCut = KSCutOff\n                        CRDEPTH =  MaxClassificationDepth\n                        MDepth = MedianClassificationDepth\n                        MCut  = MedianEventDetectionCutOff\n                        CCut = ClassificationCutOff\n                        _misc_ = MisClassificationRate;\n            end;\n        run;\n        '
    code += rename_char.format(binstats)
    if nominal:
        graphics = '\n            ODS PROCLABEL=\'ERRORPLOT\' ;\n            proc sgplot data={0};\n                title "Error and Correct rate by Depth";\n                series x=depth y=correct_rate;\n                series x=depth y=error_rate;\n                yaxis label="Percentage" grid;\n            run;\n            /* roc chart */\n            ODS PROCLABEL=\'ROCPLOT\' ;\n\n            proc sgplot data={0};\n                title "ROC Curve";\n                series x=one_minus_specificity y=sensitivity;\n                yaxis grid;\n            run;\n            /* Lift and Cumulative Lift */\n            ODS PROCLABEL=\'LIFTPLOT\' ;\n            proc sgplot data={0};\n                Title "Lift and Cumulative Lift";\n                series x=depth y=c_lift;\n                series x=depth y=lift;\n                yaxis grid;\n            run;\n            '
        code += graphics.format(out)
    code += 'run; quit; %mend;\n'
    code += ('%%mangobj(%s,%s,%s);' % (objname, objtype, self.table))
    if self.sas.nosub:
        print(code)
        return
    ll = self.sas.submit(code, 'text')
    obj1 = sp2.SASProcCommons._objectmethods(self, objname)
    return sp2.SASresults(obj1, self.sas, objname, self.sas.nosub, ll['LOG'])