[root] / trunk / roofit / roostats / src / ToyMCSampler.cxx Repository:
ViewVC logotype

Log of /trunk/roofit/roostats/src/ToyMCSampler.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 48176 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 21 15:13:08 2012 UTC (2 years, 1 month ago) by moneta
File length: 23612 byte(s)
Diff to previous 47254
HypoTestCalculatorGeneric: 

  add possibility to re-generate the same toys for getting the test statistics distribution for the alternate

ToyMCSampler: 

  set the parameters for evaluating the test statistics after generating the toys not before. 
  It should be the same within ROoStats because ToyMCSampler::fParametersForTestStat are the null POI, which are anyway re-set in 
  ToyMCSampler::Generate.   However it was a problem for combine ("CMS")

Revision 47254 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 14 11:09:24 2012 UTC (2 years, 2 months ago) by moneta
File length: 23611 byte(s)
Diff to previous 46660
Coverity fix 48064

Revision 46660 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 18 19:39:02 2012 UTC (2 years, 3 months ago) by moneta
File length: 23566 byte(s)
Diff to previous 45032
Fix a memory leak in DetailedOutputAggregator::GetAsArgSet and the way it is used. 
  - the returned set is not deleted in the caller. Make the set not owning the variables and delete now in the caller code 
(ProfileLikelihoodTestStatistics and FrequentistCalculator)

Fix ProfileLikelihoodCalculator for computing correctly the p value for higher dimensions (>1)

Add RemoveConstantParameters for a RooArgList

Revision 45032 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 12 16:03:34 2012 UTC (2 years, 6 months ago) by moneta
File length: 23493 byte(s)
Diff to previous 44917
apply fixes for Windows. 
Implementation of static function should be in *.cxx file

in stressRooStats fix sqrt (thanks to Bertrand)

Revision 44917 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 5 14:47:05 2012 UTC (2 years, 6 months ago) by moneta
File length: 23407 byte(s)
Diff to previous 44907
from Gabriel: 

  - when setting global observables in ModelConfig make them also constant
  - fix printing an info message about multigen with nuisance sampling. Do only the first time

Revision 44907 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 5 09:53:41 2012 UTC (2 years, 6 months ago) by moneta
File length: 23397 byte(s)
Diff to previous 44714
switch off the usage of multigen in case of hybrid sampling (i.e. when the nuisance parameters change for every toy). 
In this case the pdf changes and it must be re-initialized

Revision 44714 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 25 15:05:04 2012 UTC (2 years, 6 months ago) by moneta
File length: 23118 byte(s)
Diff to previous 44441
apply a bug fix from Tim for generation of global observables from a simpdf when multigen is off
This fixes a problem introduced between in r 44256 (http://root.cern.ch/viewvc?view=rev&revision=44256)

Revision 44441 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 1 09:06:31 2012 UTC (2 years, 7 months ago) by moneta
File length: 23107 byte(s)
Diff to previous 44428
fix a compilation warning

move implementation of DetailedOutputAggregator in a .cxx file to fix compilation problem on Windows
- use also ROOT coding convention for data members

Revision 44428 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 1 08:08:39 2012 UTC (2 years, 7 months ago) by moneta
File length: 23102 byte(s)
Diff to previous 44366
apply patch provided by Tim Adye: 


1) Save fit errors in detailed outputs' RooRealVars, rather than as separate
variables. If withErrorsAndPulls is specified, the asymmetric errors are also
saved. Work round bug #94908 by using RooTreeDataStore in
DetailedOutputAggregator and ToyMCImportanceSampler (can be removed when #94908
is fixed).

2) Fix detailed output dataset name and variable order (dsname_TS0 should be
first variable). Previously SamplingDistributions from importance sampling were
wrong (taken from the first global observable!).

3) Make detailed output for data available via
HypoTestResult::GetAllTestStatisticsData().

4) Don't save detailed output in HypoTestResult if it was not requested.

5) Rationalised the saving and restoring of parameters in ToyMCSampler. The POI
value in the workspace is not overwritten before calling the test stat (restores
behaviour from 5.32).

6) Remove unnecessary dataset copy in ToyMCImportanceSampler.

7) Fix ToyMCImportanceSampler double->int compiler warnings.

8) Fix minor memory leaks in HypoTestCalculatorGeneric, ToyMCSampler, and
ProfileLikelihoodTestStat.

9) Update streamer so PiecewiseInterpolation::setAllInterpCodes works for
objects created with ROOT 5.30.

Revision 44366 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 30 15:32:27 2012 UTC (2 years, 7 months ago) by axel
File length: 22633 byte(s)
Diff to previous 44266
Remove #include "Riostream.h" from roofitcore/inc/RooCacheManager.h, which pulls in using namespace std.
Deal with the consequences.

Revision 44266 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 16 12:32:18 2012 UTC (2 years, 8 months ago) by moneta
File length: 22612 byte(s)
Diff to previous 44256
apply some Coverity fixes
improve some error messaging in AsymptoticCalculator and automatically set onesideddiscovery if null snapshot is equal to minimum of parameter at construction time

Revision 44256 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 15 16:10:43 2012 UTC (2 years, 8 months ago) by moneta
File length: 22507 byte(s)
Diff to previous 44157
from Sven: fix generation of global observables when multi-gen is enabled and only the parameters change

Revision 44157 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 7 16:41:44 2012 UTC (2 years, 8 months ago) by moneta
File length: 21812 byte(s)
Diff to previous 44034
merge changes from roostats development branch  up to revision 44155

Modifications by Jakub Ademek and Max Baak :
	ensure that ToyMCSampler can return TTree with detailed fit output. 

	See for a detailed description: 
https://indico.cern.ch/getFile.py/access?contribId=0&resId=3&materialId=slides&confId=182211

Modifications by Sven Kreiss: 

ProfileLikelihoodTestStat:
- added option to add errors and pulls to detailed output
Revision 44128 - Directory Listing 
Modified Fri May 4 21:33:08 2012 UTC (2 days, 17 hours ago) by sven
ToyMCSampler, ToyMCStudy, SamplingDistribution, DetailedOutputAggregator:
- bugfixes for the naming of the result
- return toys with weight=1 when generating unweighted toys (not -1)
- make it optional to return errors and pulls with detailed output
- from Tim Adye: catch NaNs at the right place

ProfileLikelihoodTestStat:
- added option to add errors and pulls to detailed output

FrequentistCalculator (from Tim Adye):
- skip the profiling if there are no free nuisance parameters


--This line, and those below, wil

_M   roostats
_M   roostats/src
M    roostats/src/HypoTestResult.cxx
M    roostats/src/FrequentistCalculator.cxx
M    roostats/src/HypoTestCalculatorGeneric.cxx
M    roostats/src/RooStatsUtils.cxx
M    roostats/src/ToyMCSampler.cxx
M    roostats/src/ToyMCStudy.cxx
M    roostats/src/ProfileLikelihoodTestStat.cxx
M    roostats/src/SamplingDistribution.cxx
_M   roostats/inc
M    roostats/inc/LinkDef.h
M    roostats/inc/RooStats/ProfileLikelihoodTestStat.h
_M   roostats/inc/RooStats/ToyMCSamplerOld.h
M    roostats/inc/RooStats/FrequentistCalculator.h
M    roostats/inc/RooStats/HypoTestCalculatorGeneric.h
A  + roostats/inc/RooStats/DetailedOutputAggregator.h
M    roostats/inc/RooStats/RatioOfProfiledLikelihoodsTestStat.h
M    roostats/inc/RooStats/ToyMCStudy.h
M    roostats/inc/RooStats/TestStatistic.h
M    roostats/inc/RooStats/SamplingDistribution.h
M    roostats/inc/RooStats/HypoTestResult.h
A  + roostats/inc/RooStats/MinNLLTestStat.h
M    roostats/inc/RooStats/RooStatsUtils.h
M    roostats/inc/RooStats/ToyMCSampler.h

Revision 44034 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 30 14:54:15 2012 UTC (2 years, 8 months ago) by moneta
File length: 23900 byte(s)
Diff to previous 43199
Verious fixes for outstanding Coverity issues (mainly add check of returned pointers to avoid  to dereference them)

Revision 43199 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 1 20:17:42 2012 UTC (2 years, 10 months ago) by moneta
File length: 23831 byte(s)
Diff to previous 43068
merge from the roostats development branch the new developments from Sven Kreiss:

 new ToyMCImportanceSampler 
 new  version of the ToyMCSampler that can use multiple test statistics and "detailed output" of those test statistics.
 extension to the FrequentistCalculator that allows the user to manually specify the values for the signal nuisance parameters using SetConditionalMLEsNull/Alt().
 
 make  HypoTestResult managing now the  SamplingDIstribution for null and alt

Revision 43068 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 21 16:09:05 2012 UTC (2 years, 11 months ago) by moneta
File length: 23385 byte(s)
Diff to previous 42272
merge changes committed in 5.32 from  42987 to 43018 from Sven, Wouter and Kyle, 

see  http://root.cern.ch/viewvc?view=rev&revision=42988   for MarkovCHain, SamplingDistPlot and HypoTestPlot (from Sven)

     http://root.cern.ch/viewvc?view=rev&revision=42989  : set to false the default of usemultiGen in ToyMCSampler  (from Sven)

     http://root.cern.ch/viewvc?view=rev&revision=43017   : define a signed flag for the PL test statistics and have a a signed discovery TS (from Tim and Kyle)

Revision 42272 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 28 14:25:09 2011 UTC (3 years, 1 month ago) by moneta
File length: 23384 byte(s)
Diff to previous 42256
- optimize also ratio of profile likelihood test statistics
 (factorize profile TS and use that one in the ratio of profiles)

- in ToyMCSampler set the static to use multigen to true

Revision 42256 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 25 19:39:46 2011 UTC (3 years, 1 month ago) by moneta
File length: 23385 byte(s)
Diff to previous 41985
from Sven Kreiss: 

adapt  ToyMCSampler to use the new autobinning generation from RooFit

add additional functions:
     // name of the tag for individual components to be generated binned (=> see RooFit::GenBinned() option)
     void SetGenerateBinnedTag( const char* binnedTag = "" ) { fGenerateBinnedTag = binnedTag; }
     // set auto binned generation (=> see RooFit::AutoBinned() option)
     void SetGenerateAutoBinned( Bool_t autoBinned = kTRUE ) { fGenerateAutoBinned = autoBinned; }

Increased ClassDef version to 3.
Default is the same as RooFit, ie autobinned is kTRUE as default and fGenerateBinnedTag = "".

Revision 41985 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 14 21:47:39 2011 UTC (3 years, 2 months ago) by moneta
File length: 22884 byte(s)
Diff to previous 40959
merge fix 41879 from Sven in roostats dev branch to be able to run with zero toys

Revision 40959 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 20 16:33:21 2011 UTC (3 years, 4 months ago) by moneta
File length: 22807 byte(s)
Diff to previous 40241
- add in MCMCCalculator SetChainParameters to define the parameters to be put in the chain

- fix a bug  of computing  p values in SamplingDistribution introduced in 40920

- ToyMCSampler - clear the cached GenContext and pdf lists  when setting a new PDF

- add a unique name for teh SamplingDist objects created in the Inverter
- fix also the shading in the plots of SamplingDist objects and the plotting in  the log scale

Revision 40241 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 14 17:13:28 2011 UTC (3 years, 6 months ago) by moneta
File length: 21893 byte(s)
Diff to previous 40001
merge fix from Sven in ToyMCSampler in dev branch 

http://root.cern.ch/viewvc?view=rev&revision=40239

Revision 40001 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 27 15:12:33 2011 UTC (3 years, 6 months ago) by moneta
File length: 20641 byte(s)
Diff to previous 39975
fix some memory leaks 
-rename setXXX to Set

Revision 39975 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 26 22:49:46 2011 UTC (3 years, 6 months ago) by moneta
File length: 20580 byte(s)
Diff to previous 39945
merge from roostats dev branch : 

 - from Sven: new version of ToyMCSampler
 - from Kyle: update tutorial StandardTestStatDistributionDemo
 -from LM : new version of Inverter with rebuilding pValues distributions using toys
            + update comments

Revision 39945 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 24 14:06:56 2011 UTC (3 years, 7 months ago) by wouter
File length: 17931 byte(s)
Diff to previous 39928
  

    o RooHistFunc,LinkDef3

      - Apply same fix to streamer as done in RooHistPdf
        to ajust proxyList


    o RooAbsArg

      - Add RooHistFunc as friend


    o RooChi2Var

      - Savannah bug fix #81582


    o RooHistError

      - Savannah bug fix #80991


    o ToyMCSampler,ProfileLikelihoodTestStat

      - Implement 'dual switch' for speed optimization: a switch per object
        and a static switch for all objects (the 'or' is used). The default
        remains off.

Revision 39928 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 24 08:18:59 2011 UTC (3 years, 7 months ago) by moneta
File length: 17837 byte(s)
Diff to previous 39719
merge latest fixes in development branch of roostats in the trunk from revision r39839 through r39927

 see http://root.cern.ch/viewvc/branches/dev/roostats/roofit/?view=log

Revision 39719 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 14 15:17:29 2011 UTC (3 years, 7 months ago) by moneta
File length: 16900 byte(s)
Diff to previous 39004
merge from roostats development branch (from revision r39531 through r39718 )

Revision 39004 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 21 13:47:21 2011 UTC (3 years, 9 months ago) by moneta
File length: 16763 byte(s)
Diff to previous 38933
add SequentialPorposal class from Giovanni Petrucciani
add fix for generating global observables from Kyle

Revision 38933 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 19 20:15:51 2011 UTC (3 years, 9 months ago) by moneta
File length: 15867 byte(s)
Diff to previous 37564
merge from development branch of roostats 
https://root.cern.ch/svn/root/branches/dev/roostats
from revision  38733 up to 38932 

- new version of Bayesian calculator with better debugging and not using RooProdPdf
  and with new MC sampling method based on nuisance 
- fix error in ToyMCSampler when using weights (e.g. importance sampling)

Revision 37564 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 13 13:47:23 2010 UTC (4 years, 1 month ago) by moneta
File length: 15212 byte(s)
Diff to previous 37522
from Sven: 

 - apply fix for switching off GUI when running PROOF. Enabling the GUI causes a crash

in addition: 
 - clean up of tutorials by adding first comment line
 - new tutorial with example of multi-dim sampling

Revision 37522 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 10 16:31:00 2010 UTC (4 years, 1 month ago) by moneta
File length: 15184 byte(s)
Diff to previous 37085
merge from roostats dev branch fix http://root.cern.ch/viewvc/branches/dev/roostats/roofit/roostats/src/?view=log from Sven Kreiss

Revision 37085 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 29 21:45:57 2010 UTC (4 years, 1 month ago) by moneta
File length: 15052 byte(s)
Diff to previous 37084
fix a compilation warning

Revision 37084 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 29 21:37:13 2010 UTC (4 years, 1 month ago) by moneta
File length: 15055 byte(s)
Diff to previous 36808
merge from the development branch the changes applied by Kyle and Sven from revision 36852 to 
37056. 

Major changes:  added HybridCalculatorGeneric
                fixes for ModelConfig when reading from a file

Revision 36808 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 20 11:28:30 2010 UTC (4 years, 2 months ago) by moneta
File length: 14714 byte(s)
Diff to previous 36602
apply fixes from Coverity (dead code and forward null)

Revision 36602 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 11 16:52:13 2010 UTC (4 years, 2 months ago) by moneta
File length: 14750 byte(s)
Diff to previous 34109
merge  changes from development Branch from Sven Kreiss

 http://root.cern.ch/viewvc?view=rev&revision=34726

and

http://root.cern.ch/viewvc?view=rev&revision=35057

A new class is added ToyMCStudy for toy MC generation using Proof

Revision 34109 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 24 15:00:16 2010 UTC (4 years, 7 months ago) by moneta
File length: 5671 byte(s)
Copied from: branches/dev/roostats/roofit/roostats/src/ToyMCSampler.cxx revision 34103
Diff to previous 34099
merge roostats development branch from revision 33228 to 34108 included

Revision 34099 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 24 09:48:19 2010 UTC (4 years, 7 months ago) by moneta
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler.cxx
File length: 5671 byte(s)
Diff to previous 34091
add a info message showing the progress of the toy generation

Revision 34091 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 23 21:44:08 2010 UTC (4 years, 7 months ago) by cranmer
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler.cxx
File length: 5514 byte(s)
Diff to previous 34090
IMPORTANT bug fix for HybridCalculator

Revision 34090 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 23 21:39:42 2010 UTC (4 years, 7 months ago) by cranmer
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler.cxx
File length: 5513 byte(s)
Diff to previous 34067
IMPORTANT bug fix for HybridCalculator

Revision 34067 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 22 21:38:09 2010 UTC (4 years, 7 months ago) by moneta
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler.cxx
File length: 5343 byte(s)
Diff to previous 34035
- fix some compilation warning in ProfileLikelihoodTestSTat 
- fix an unitialized variable in ToyMCSampler and set data member to protected for derived classes
- add axtra check if a pdf can be extended

Revision 34035 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 22 06:52:01 2010 UTC (4 years, 7 months ago) by sven
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler.cxx
File length: 5110 byte(s)
Copied from: branches/dev/roostats/roofit/roostats/src/ToyMCSampler2.cxx revision 34030
Diff to previous 34013
Renaming:
- HybridCalculator => HybridCalculatorOld and HybridCalculator2 => HybridCalculator
- ToyMCSampler => ToyMCSamplerOld and ToyMCSampler2 => ToyMCSampler

Note: File histories might behave unexpected for the renames that overwrite previous versions. Look up the file histories of the old names previous to this commit.

Revision 34013 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 21 13:17:08 2010 UTC (4 years, 7 months ago) by cranmer
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler2.cxx
File length: 5290 byte(s)
Diff to previous 34012
Fixes to last commit, migration of FeldmanCousins to ToyMCSampler2, new MaxLikelihoodEstimateTestStat

Revision 34012 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 21 12:27:18 2010 UTC (4 years, 7 months ago) by sven
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler2.cxx
File length: 4766 byte(s)
Diff to previous 33912
TestStatSampler (also affects ToyMCSampler2 and DebuggingSampler):
- removed ModelConfig
- setters take const parameters
- added optional SetSamplingDistName(...)

ToyMCSampler2:
- option to generate binned data
- added AppendSamplingDistribution(...)
- removed SetData(...)
- applied changes from the interface TestStatSampler


RatioOfProfiledLikelihoodsTestStat (added)

SimpleLikelihoodRatioTestStat:
- fixed memory leaks

ModelConfig:
- added Global Observables

SamplingDistPlot:
- added capabilities for a Legend and other objects than TH1F
- added AddSamplingDistributionShaded(...)
- added AddLine(...)
- added a default style (including a flag to turn it off)
- added addOtherObject(...) to support more than just TH1F

SamplingDistribution:
- added Integral(...) to do numerical integration in given range

HypoTestPlot (added, inherits from SamplingDistPlot)
- can handle partially filled HypoTestResults

HypoTestResult:
- added member variables to hold SamplingDistributions for Alternative and Null Hypothesis
- added member variable to hold value of test statistic evaluated on data
- removed "mutable" for member p-values
- can handle partially filled members (e.g. no SamplingDistribution for alternative)

HybridCalculator2:
- returns now a HypoTestResult
- added GetTestStatSampler(...)
- added ForcePriorNuisance(...)

TestStatistic:
- make explicit that parameters given to Evaluate(...) have to be the parameters for the Null hypothesis

Tutorial rs201b_hybridcalculator2.C updated

Revision 33912 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue Jun 15 12:00:16 2010 UTC (4 years, 7 months ago) by cranmer
Original Path: branches/dev/roostats/roofit/roostats/src/ToyMCSampler2.cxx
File length: 3645 byte(s)
Adding HybridCalculator2 by Sven Kreiss

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9