本文整理汇总了Python中trainer.Trainer.evaluateLastTraining方法的典型用法代码示例。如果您正苦于以下问题:Python Trainer.evaluateLastTraining方法的具体用法?Python Trainer.evaluateLastTraining怎么用?Python Trainer.evaluateLastTraining使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类trainer.Trainer
的用法示例。
在下文中一共展示了Trainer.evaluateLastTraining方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from trainer import Trainer [as 别名]
# 或者: from trainer.Trainer import evaluateLastTraining [as 别名]
trainer.setBTreeName('background') # name of backgroundtree in files
trainer.setReasonableDefaults() # set some configurations to reasonable values
trainer.setEqualNumEvents(True) # reweight events so that integral in training and testsample is the same
trainer.useTransformations(True) # faster this way
trainer.setVerbose(True) # no output during BDT training and testing
trainer.setWeightExpression('Weight')
#set BDT options
trainer.setBDTOption("NTrees=10")
trainer.setBDTOption("Shrinkage=0.01")
trainer.setBDTOption("nCuts=50")
trainer.setBDTOption("MaxDepth=2")
print trainer.best_variables
trainer.trainBDT(variables)
ROC, ksS, ksB, ROCT = trainer.evaluateLastTraining()
trainer.SetPlotFile()
trainer.SetLogFile()
trainer.OpenPDF()
print ROC, ROCT, ksS, ksB
#trainer.bookbetterReader()
trainer.return_ams()
#trainer.testBDT(variables)
#trainer.plotVarHistos()
#trainer.suche(2000, 5000, 0.001, 0.01, 10)#variates nTrees between 1500-2500 and shrinkage between 0.001-0.01 in 5 steps
print trainer.bdtoptions
print trainer.factoryoptions