Пример #1
0
    def __init__(self, thisData, thisEerObject, thisCllrObject, thisConfig, thisExpName, thisDebug):
        self._debug = thisDebug
        self.data = thisData
        self._eerObject = thisEerObject
        self._cllrObject = thisCllrObject
        self.config = thisConfig
        self._expName = thisExpName
        self._printToFilename = thisExpName
        self.debug = thisDebug
        Probability.__init__(self, self.data, self.config, self.debug)
        self.plotType = 'det_plot'
        self.fig = None
        self.event = None

        # Values required for linear scale => gaussian scale conversion at __ppndf__()
        self.__SPLIT__ = 0.42
        self.__A0__ = 2.5066282388
        self.__A1__ = -18.6150006252
        self.__A2__ = 41.3911977353
        self.__A3__ = -25.4410604963
        self.__B1__ = -8.4735109309
        self.__B2__ = 23.0833674374
        self.__B3__ = -21.0622410182
        self.__B4__ = 3.1308290983
        self.__C0__ = -2.7871893113
        self.__C1__ = -2.2979647913
        self.__C2__ = 4.8501412713
        self.__C3__ = 2.3212127685
        self.__D1__ = 3.5438892476
        self.__D2__ = 1.6370678189
        self.__EPS__ = 2.2204e-16
Пример #2
0
    def __init__(self, thisData, thisEerObject, thisCllrObject, thisConfig,
                 thisExpName, thisDebug):
        self._debug = thisDebug
        self.data = thisData
        self._eerObject = thisEerObject
        self._cllrObject = thisCllrObject
        self.config = thisConfig
        self._expName = thisExpName
        self._printToFilename = thisExpName
        self.debug = thisDebug
        Probability.__init__(self, self.data, self.config, self.debug)
        self.plotType = 'det_plot'
        self.fig = None
        self.event = None

        # Values required for linear scale => gaussian scale conversion at __ppndf__()
        self.__SPLIT__ = 0.42
        self.__A0__ = 2.5066282388
        self.__A1__ = -18.6150006252
        self.__A2__ = 41.3911977353
        self.__A3__ = -25.4410604963
        self.__B1__ = -8.4735109309
        self.__B2__ = 23.0833674374
        self.__B3__ = -21.0622410182
        self.__B4__ = 3.1308290983
        self.__C0__ = -2.7871893113
        self.__C1__ = -2.2979647913
        self.__C2__ = 4.8501412713
        self.__C3__ = 2.3212127685
        self.__D1__ = 3.5438892476
        self.__D2__ = 1.6370678189
        self.__EPS__ = 2.2204e-16
Пример #3
0
    def __init__(self, thisData, thisCllrWrapper, thisConfig, thisExpName, thisDebug=True):
        self.data = thisData
        self.cllr = thisCllrWrapper
        self.config = thisConfig
        self._printToFilename = thisExpName
        self._expName = thisExpName
        self.debug = thisDebug
        Probability.__init__(self, self.data, self.config, self.debug)
        self.plotType = 'eer_plot'
        self.fig = None
        self.event = None

        metaDataValues = self.data.getMetaDataValues()
        metaColors = self.config.getMetaColors()
        self.colors = assignColors2MetaDataValue(metaDataValues, metaColors)

        self.eerData = self.computeProbabilities(self.eerFunc)
        self.eerValue = {}
        self.score = {}
        for thisMetaValue in sorted(self.colors.keys()):
            for metaValue, PD, PP, X in self.eerData:
                if thisMetaValue == metaValue:
                    try:
                        self.eerValue[metaValue], self.score[metaValue] = self.computeEer(PD, PP, X)
                        print("EER: {:.4f} % at score: {:.4f} and meta value: {}".format(
                            self.eerValue[metaValue] * 100, self.score[metaValue], metaValue)
                        )
                    except Exception as e:
                        print("Problem computing EER for %s: %s" % (thisMetaValue, e))
                    else:
                        self.eerValue[metaValue] *= 100
                    break
Пример #4
0
 def __init__(self, thisData, thisEer, thisCllr, thisConfig, thisExpName, thisDebug=True):
     self.data = thisData
     self._eerObject = thisEer
     self._cllrObject = thisCllr
     self.config = thisConfig
     self._expName = thisExpName
     self._printToFilename = thisExpName
     self.debug = thisDebug
     self.plotType = 'roc_plot'
     self.fig = None
     self.event = None
     Probability.__init__(self, self.data, self.config, self.debug)
Пример #5
0
 def __init__(self,
              thisData,
              thisEer,
              thisCllr,
              thisConfig,
              thisExpName,
              thisDebug=True):
     self.data = thisData
     self._eerObject = thisEer
     self._cllrObject = thisCllr
     self.config = thisConfig
     self._expName = thisExpName
     self._printToFilename = thisExpName
     self.debug = thisDebug
     self.plotType = 'roc_plot'
     self.fig = None
     self.event = None
     Probability.__init__(self, self.data, self.config, self.debug)
Пример #6
0
    def __init__(self,
                 thisData,
                 thisCllrWrapper,
                 thisConfig,
                 thisExpName,
                 thisDebug=True):
        self.data = thisData
        self.cllr = thisCllrWrapper
        self.config = thisConfig
        self._printToFilename = thisExpName
        self._expName = thisExpName
        self.debug = thisDebug
        Probability.__init__(self, self.data, self.config, self.debug)
        self.plotType = 'eer_plot'
        self.fig = None
        self.event = None

        metaDataValues = self.data.getMetaDataValues()
        metaColors = self.config.getMetaColors()
        self.colors = assignColors2MetaDataValue(metaDataValues, metaColors)

        self.eerData = self.computeProbabilities(self.eerFunc)
        self.eerValue = {}
        self.eerScore = {}
        for thisMetaValue in sorted(self.colors.keys()):
            for metaValue, PD, PP, X in self.eerData:
                if thisMetaValue == metaValue:
                    try:
                        self.eerValue[metaValue], self.eerScore[
                            metaValue] = self.computeEer(PD, PP, X)
                        print(
                            "EER: {:.4f} % at score: {:.4f} and meta value: {}"
                            .format(self.eerValue[metaValue] * 100,
                                    self.eerScore[metaValue], metaValue))
                    except Exception as e:
                        print("Problem computing EER for %s: %s" %
                              (thisMetaValue, e))
                    else:
                        self.eerValue[metaValue] *= 100
                    break