From: Jan T. <the...@ph...> - 2011-11-17 10:15:28
|
Hi Rustem, did you call factory->PrepareTrainingAndTestTree("optionsgohere") before calling TrainAllMethods? Cheers Jan On Thu, 17 Nov 2011 11:08:13 +0100 Rustem Ospanov <rus...@ce...> wrote: > Hi Jan and Helge, > > I have into problems with this approach. The "TrainAllMethods" > function checks that DataInputHandler has at least one events, > otherwise the job exits with kFATAL signal. Any suggestions? > > http://root.cern.ch/svn/root/trunk/tmva/src/Factory.cxx > > Thank you, > Rustem > > On Tue, Nov 15, 2011 at 5:02 PM, Jan Therhaag > <the...@ph...> wrote: >> Hi Rustem, >> >> yes, you can use the Factory without reading from a tree. Just >>create a >> factory object and book the variables as you would normally do and >>then loop >> over all events you would like to add. You have to fill a >>vector<double> >> with the registered variables for each event (order!) and decide >>somehow if >> the event is signal or background. Then add it like: >> >> factory->AddEvent("Signal", eventType, vars, weight); //(or >>"Background" >> instead or "Signal") >> >> The argument named eventType is either TMVA::Types::kTesting or >> TMVA::Types::kTraining, depending on what you want to use the event >>for. >> >> You can then train/test/evaluate as usual. >> >> Cheers >> Jan >> >> On Tue, 15 Nov 2011 16:41:46 +0100 >> Rustem Ospanov <rus...@ce...> wrote: >>> >>> Hello, >>> >>> I have a question about using TMVA::Factory without input trees. >>>There >>> is no example for such use case. Factory class has AddEvent method. >>>So >>> is it possible to add events directly to Factory without reading >>>them >>> from trees? >>> >>> Thank you, >>> Rustem >>> >>> >>> ------------------------------------------------------------------------------ >>> RSA(R) Conference 2012 >>> Save $700 by Nov 18 >>> Register now >>> http://p.sf.net/sfu/rsa-sfdev2dev1 >>> _______________________________________________ >>> TMVA-users mailing list >>> TMV...@li... >>> https://lists.sourceforge.net/lists/listinfo/tmva-users >> >> -------------- >> >> Jan Therhaag >> Physikalisches Institut, Universität Bonn >> Office: CERN bat. 304-1-042 Tel: +41 22 76 78052 >> eMail: the...@ph... >> >> -------------- Jan Therhaag Physikalisches Institut, Universität Bonn Office: CERN bat. 304-1-042 Tel: +41 22 76 78052 eMail: the...@ph... |