13 if __name__ ==
"__main__":
14 from basf2
import conditions
16 conditions.testing_payloads = [
17 'localdb/database.txt'
21 general_options = basf2_mva.GeneralOptions()
22 general_options.m_datafiles = basf2_mva.vector(
"train.root")
23 general_options.m_treename =
"tree"
24 general_options.m_identifier =
"MVADatabaseIdentifier"
25 general_options.m_variables = basf2_mva.vector(
'M',
'p',
'pz',
'pt',
'phi',
'daughter(0, kaonID)',
'daughter(0, pionID)',
26 'daughter(1, kaonID)',
'daughter(1, pionID)',
'chiProb',
'dr',
'dz',
'dphi')
27 general_options.m_target_variable =
"isSignal"
29 fastbdt_options = basf2_mva.FastBDTOptions()
31 basf2_mva.teacher(general_options, fastbdt_options)
34 basf2_mva.download(
'MVADatabaseIdentifier',
'weightfile.root')
37 general_options.m_identifier =
"weightfile2.root"
38 basf2_mva.teacher(general_options, fastbdt_options)
41 basf2_mva.upload(
'weightfile2.root',
'MVADatabaseIdentifier2')
44 basf2_mva.expert(basf2_mva.vector(
'weightfile.root',
'weightfile2.root',
'MVADatabaseIdentifier',
'MVADatabaseIdentifier2'),
45 basf2_mva.vector(
'train.root'),
'tree',
'expert.root')