コード例 #1
0
    def MakePlots(self, OutPreOther, OutPreSame):
        """ Plotting the ROC, Score of the Model """
        AucOthers, AucSames = [], []
        PlotService.RocCurve("./",OutPreOther,self.DataSet,self.ModelNames)
        if(len(self.ModelNames) == 1):
            AucOther, AucSame = PlotService.Score("./",OutPreOther[0],OutPreSame[0],self.DataSet,self.ModelNames[0])
        elif(len(self.ModelNames) > 1):
            for i,Name in enumerate(self.ModelNames):
                AucOther, AucSame = PlotService.Score("./",OutPreOther[i],OutPreSame[i],self.DataSet,Name)
        AucOthers.append(AucOther)
        AucSames.append(AucSame)            

        return AucOthers, AucSames
コード例 #2
0
ファイル: EvalMulti.py プロジェクト: NSchwanPhy/4topsAnalysis
 def PreTrainedFNN(self):
     LOutPreOther = []
     for Name in self.ModelNames:
         OutPreOther, OutPreSame = self.GetOutPreFromFile(Name)
         PreLabelsOther, PreLabelsSame = self.PredictClasses(
             OutPreOther, OutPreSame)
         #self.MakeConfusionMatrix(Name, PreLabelsOther, PreLabelsSame)
         Classnum = 13
         PlotService.MultiScore("./plots/", OutPreOther[:, Classnum],
                                OutPreSame[:, Classnum], self.DataSet, Name,
                                Classnum)  #Score for Sig
         PlotService.Score("./plots/", OutPreOther[:, Classnum],
                           OutPreSame[:, Classnum], self.DataSet, Name)
         #Fit(OutPreOther)
         LOutPreOther.append(OutPreOther[:, 0])
     PlotService.RocCurve("./plots/", LOutPreOther, self.DataSet,
                          self.ModelNames)
コード例 #3
0
ファイル: EvalMulti.py プロジェクト: NSchwanPhy/4topsAnalysis
 def EvaluateFNN(self):
     LOutPreOther = []
     for Name in self.ModelNames:
         if ("BDT" in Name):  #Import the BDT Scores as comperison
             OutPreOther, OutPreSame = self.GetOutPreFromFile(Name)
         else:
             OutPreOther, OutPreSame = self.GetOutPreFromRoc(Name)
         PreLabelsOther, PreLabelsSame = self.PredictClasses(
             OutPreOther, OutPreSame)
         self.MakeConfusionMatrix(Name, PreLabelsOther, PreLabelsSame)
         PlotService.Score("./plots/", OutPreOther[:, 0], OutPreSame[:, 0],
                           self.DataSet, Name)
         PlotService.MultiScore("./plots/", OutPreOther[:, 0],
                                OutPreSame[:, 0], self.DataSet, Name,
                                0)  #Score for Sig
         LOutPreOther.append(OutPreOther[:, 0])
     PlotService.RocCurve("./plots/", LOutPreOther, self.DataSet,
                          self.ModelNames)