8 if __name__ ==
"__main__":
9 from basf2
import conditions
11 conditions.testing_payloads = [
12 'localdb/database.txt'
16 general_options = basf2_mva.GeneralOptions()
17 general_options.m_datafiles = basf2_mva.vector(
"train.root")
18 general_options.m_treename =
"tree"
19 general_options.m_identifier =
"MVADatabaseIdentifier"
20 general_options.m_variables = basf2_mva.vector(
'M',
'p',
'pz',
'pt',
'phi',
'daughter(0, kaonID)',
'daughter(0, pionID)',
21 'daughter(1, kaonID)',
'daughter(1, pionID)',
'chiProb',
'dr',
'dz',
'dphi')
22 general_options.m_target_variable =
"isSignal"
24 fastbdt_options = basf2_mva.FastBDTOptions()
26 basf2_mva.teacher(general_options, fastbdt_options)
29 basf2_mva.download(
'MVADatabaseIdentifier',
'weightfile.root')
32 general_options.m_identifier =
"weightfile2.root"
33 basf2_mva.teacher(general_options, fastbdt_options)
36 basf2_mva.upload(
'weightfile2.root',
'MVADatabaseIdentifier2')
39 basf2_mva.expert(basf2_mva.vector(
'weightfile.root',
'weightfile2.root',
'MVADatabaseIdentifier',
'MVADatabaseIdentifier2'),
40 basf2_mva.vector(
'train.root'),
'tree',
'expert.root')