-
Notifications
You must be signed in to change notification settings - Fork 4
/
Example_PSOConfig.txt
128 lines (110 loc) · 5.65 KB
/
Example_PSOConfig.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
##Parameters for the Particle Swarm Optimization
##RunOn = EKPSL5 | EKPSL5 | NAFSL5 | NAFSL6
RunOn=NAFSL6
## Swarm Parameters
NParticles=15
NIterations=25
wIneratia=0.729
wMemory=1.49445
wSwarm=1.49445
##FOM = ROCIntegral | Separation | rejB_vs_effS_0.1 | rejB_vs_effS_0.3 |rejB_vs_effS_0.5 | Chi2_B_muSB
FOM=ROCIntegral
KSThreshold=0.2
MaxVariablesInCombination=14
##only add variable if new FOM > ImprovementThreshold*FOM
ImprovementThreshold=1.005
## repeat each training additional times with different random seeds for test/training splitting (0==no repetition)
## only reasonable if SplitSeed=0 is in the PreparationString a few lines down
## and if UseEvenOddSplitting=0
## FOM and KS will be taken as the worst of all trainings
RepeatTrainingNTimes=2
## draw random starting variables, 0== use predermined starting variables
DrawNRandomAsStartingVars=0
##NOTYET SaveTrainingsToTrees=False
##TMVA Options
FactoryString=!V:Silent:Color:!DrawProgressBar:Transformations=I:AnalysisType=Classification
PreparationString=SplitMode=Random:NormMode=EqualNumEvents:!V
##if you want to limit the number of events do it eiter PreparationString or here
nTrain_Signal=
nTrain_Background=
nTest_Signal=
nTest_Background=
##Weight expression, might need to be declared in WeightVariables furhter down
## probably same syntax as in TTree::Draw
SignalWeightExpression=Weight_XS
BackgroundWeightExpression=Weight_XS
##Method to train and test
##only tested with BDT so far
## you might want to think abount you handle NEGATIVE WEIGHTS
##Parameters in MethodParams will be overwritten if they span the search space
MethodType=TMVA::Types::kBDT
MethodParams=!H:!V:NTrees=100:BoostType=Grad:Shrinkage=0.01:UseBaggedBoost:GradBaggingFraction=0.5:nCuts=10:MaxDepth=2:NegWeightTreatment=IgnoreNegWeightsInTraining
## search space
##coord=["Name",minValue,maxValue,maxVelocity,"int|float"]
##if min and max value are the same the value is not varied
coord=["NTrees",100,1500,50,"int"]
coord=["Shrinkage",0.001,0.05,0.002,"float"]
coord=["GradBaggingFraction",0.1,0.9,0.05,"float"]
coord=["nCuts",10,80,4,"int"]
##coord=["MaxDepth",2,3,1,"int"]
##--------------------------------------------------
##Source Trees:
## if UseEvenOddSplitting=1, the input trees will be split in training/testsample with Variable "Evt_Odd"
## maybe change the variable in PSO/PrepareTrees.C
## else TMVA will use built in splitting
UseEvenOddSplitting=0
## use selections without quotation marks. E.g.:
## SelectionString=(N_Jets==4)&&(N_BTagsM==3)
SelectionString=TMath::Abs(CSV[0])<=1.0
SourceSignalFile=/storage/a/karimel/Spring15_Base20thJuly/forFOMStudy/Category_64/tthbb_nominal.root
SourceSignalTree=MVATree
SourceBackgroundFile=/storage/a/karimel/Spring15_Base20thJuly/forFOMStudy/Category_64/ttbar_nominal.root
SourceBackgroundTree=MVATree
##------------------------------------------------
##Variables in Format ["NAME","TYPE","LENGTH","VarExpression"]
##IMPORTANT dont leave a blank line between the initial and the end variables line
##variables the optimization starts with
InitialVariables:
["BDTOhio_v2_input_h2","F","","BDTOhio_v2_input_h2"]
["BDTOhio_v2_input_avg_dr_tagged_jets","F","","BDTOhio_v2_input_avg_dr_tagged_jets"]
["BDTOhio_v2_input_sphericity","F","","BDTOhio_v2_input_sphericity"]
["BDTOhio_v2_input_third_highest_btag","F","","BDTOhio_v2_input_third_highest_btag"]
["BDTOhio_v2_input_h3","F","","BDTOhio_v2_input_h3"]
["BDTOhio_v2_input_HT","F","","BDTOhio_v2_input_HT"]
["BDTOhio_v2_input_M3","F","","BDTOhio_v2_input_M3"]
["BDTOhio_v2_input_fifth_highest_CSV","F","","BDTOhio_v2_input_fifth_highest_CSV"]
["BDTOhio_v2_input_fourth_highest_btag","F","","BDTOhio_v2_input_fourth_highest_btag"]
EndVariables
##---------------------------------------------------
## variables the swarm can try
AdditionalVariables:
["BDTOhio_v2_input_avg_btag_disc_btags","F","","BDTOhio_v2_input_avg_btag_disc_btags"]
["BDTOhio_v2_input_maxeta_jet_jet","F","","BDTOhio_v2_input_maxeta_jet_jet"]
["BDTOhio_v2_input_pt_all_jets_over_E_all_jets","F","","BDTOhio_v2_input_pt_all_jets_over_E_all_jets"]
["BDTOhio_v2_input_all_sum_pt_with_met","F","","BDTOhio_v2_input_all_sum_pt_with_met"]
["BDTOhio_v2_input_aplanarity","F","","BDTOhio_v2_input_aplanarity"]
["BDTOhio_v2_input_dr_between_lep_and_closest_jet","F","","BDTOhio_v2_input_dr_between_lep_and_closest_jet"]
["BDTOhio_v2_input_best_higgs_mass","F","","BDTOhio_v2_input_best_higgs_mass"]
["BDTOhio_v2_input_fourth_jet_pt","F","","BDTOhio_v2_input_fourth_jet_pt"]
["BDTOhio_v2_input_invariant_mass_of_everything","F","","BDTOhio_v2_input_invariant_mass_of_everything"]
["BDTOhio_v2_input_min_dr_tagged_jets","F","","BDTOhio_v2_input_min_dr_tagged_jets"]
["BDTOhio_v2_input_second_highest_btag","F","","BDTOhio_v2_input_second_highest_btag"]
["BDTOhio_v2_input_h0","F","","BDTOhio_v2_input_h0"]
["BDTOhio_v2_input_maxeta_jet_tag","F","","BDTOhio_v2_input_maxeta_jet_tag"]
["BDTOhio_v2_input_maxeta_tag_tag","F","","BDTOhio_v2_input_maxeta_tag_tag"]
["Evt_Deta_JetsAverage","F","","Evt_Deta_JetsAverage"]
["BDTOhio_v2_input_third_jet_pt","F","","BDTOhio_v2_input_third_jet_pt"]
["Evt_CSV_Average","F","","Evt_CSV_Average"]
["BDTOhio_v2_input_b","F","","BDTOhio_v2_input_h1"]
["BDTOhio_v2_input_closest_tagged_dijet_mass","F","","BDTOhio_v2_input_closest_tagged_dijet_mass"]
["BDTOhio_v2_input_tagged_dijet_mass_closest_to_125","F","","BDTOhio_v2_input_tagged_dijet_mass_closest_to_125"]
["BDTOhio_v2_input_dEta_fn","F","","BDTOhio_v2_input_dEta_fn"]
EndVariables
##---------------------------------------------------
## variables used for reweighting and stuff
WeightVariables:
["Weight_XS","F","","Weight_XS"]
["Weight","F","","Weight"]
["Evt_Odd","F","","Evt_Odd"]
EndVariables
##---------------------------------------------------