Log of /trunk/tmva/src/PDEFoamDensityBase.cxx
Parent Directory
Revision
37683 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 22 09:03:52 2010 UTC (4 years, 1 month ago) by
avoigt
Original Path:
branches/dev/tmva/src/PDEFoamDensityBase.cxx
File length: 5684 byte(s)
Copied from:
branches/dev/tmvaValidation/PDEFoam3/src/PDEFoamDensityBase.cxx revision 37682
Diff to
previous 37678
Merge complete branch dev/tmvaValidation/PDEFoam3 into dev/tmva
Release notes:
==============
New PDEFoam structure:
----------------------
The different PDEFoam variants are now subclasses of the class
TMVA::PDEFoam. These variants are:
- PDEFoamEvent (stores the number of events)
- PDEFoamDiscriminant (stores the discriminant)
- PDEFoamTarget (stores a single target)
- PDEFoamMultiTarget (variation of PDEFoamEvent)
- PDEFoamDecisionTree (decision tree-like cell splitting)
Per default PDEFoam stores in the cells the number of events (event
weights) and therefore acts as an event density estimator. However,
the above listed derived classes override this behaviour to implement
certain PDEFoam variations.
The different PDEFoam's density estimators are now derived classes of
the abstract interface class TMVA::PDEFoamDensityBase. These density
estimators are:
- PDEFoamEventDensity (estimates the event density)
- PDEFoamDiscriminantDensity (estimates the discriminant density)
- PDEFoamTargetDensity (estimates the target density)
- PDEFoamDecisionTreeDensity (estimates decision tree separation type)
The various PDEFoam kernels are now separate from the PDEFoam class.
The abstract kernel interface is provided by the class
TMVA::PDEFoamKernelBase. The concrete classes PDEFoamKernelTrivial,
PDEFoamKernelLinN and PDEFoamKernelGauss implement specific kernel
estimators.
Extended PDEFoam functionality:
-------------------------------
* Multiclass classification via training of one discriminator foam
for each variable.
* The cell tree can now be plotted from the macro test/PlotFoams.C
This makes it easyer to compare the PDEFoam structure to a
decision tree etc.
* Variable importance ranking by counting the number of cuts made in
the diverse dimensions. The variable, for which the most cuts
were done is ranked highest.
Fixed bugs:
-----------
* The size of the sampling box in each dimension was 2*VolFrac times
the foam size in this dimension. This was contrast to the
intention and the documentation in the UserGuide. This is now
corrected: The size of the sampling box in each dimension is now
VolFrac times the foam size in this dimension. This implies that
the VolFrac default value must be changed from 0.0333 to 0.0666 to
lead the same results.
Revision
37630 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 17 14:13:26 2010 UTC (4 years, 1 month ago) by
avoigt
Original Path:
branches/dev/tmvaValidation/PDEFoam3/src/PDEFoamDensityBase.cxx
File length: 5558 byte(s)
Diff to
previous 37627
Apply ROOT coding conventions to all new PDEFoam classes via astyle.
(The old PDEFoam classes are untouched in order to avoid problems when
merging this branch into dev/tmva later.)
The used astyle options are:
--style=k/r
--indent=spaces=3 # three spaces per indentation level
--convert-tabs # convert tabs into spaces
--indent-switches # case block is indented wrt switch
--indent-namespaces
--indent-preprocessor # indent pp statements ending on '\'
--max-instatement-indent=60 # if indentation of continuing line is <60, indent
--min-conditional-indent=0 # no extra indent for continued conditions
--pad-oper # space around operands
--pad-header # add a space around () after if, while,...
--unpad-paren # and remove all unwanted padding around parentheses
--suffix=none # no backups - we have subversion
--recursive # so you can do astyle "core/*.cxx" "core/*.h"
Revision
37349 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 6 19:07:30 2010 UTC (4 years, 1 month ago) by
avoigt
Original Path:
branches/dev/tmvaValidation/PDEFoam3/src/PDEFoamDensity.cxx
File length: 5986 byte(s)
Diff to
previous 37310
Remove dependence of PDEFoamDensity of PDEFoam.
Now PDEFoamDensity has cleaner interface: It takes only the
range-searching volume box size as an argument. The special user
parameters fVolFrac and fDim were removed, because they can be
translated into the range-searching volume box. The return value of
Density() is now exactly the event density (number of events / box
volume) and no longer scaled by the foam volume.
The meaning of VolFrac was slightliy changed: The size of the
range-searching box is now equal to the inverse Volfrac (before it was
2^dim * Volfrac).
It was checked that the old ROC values can be reproduced (but with the
double Volfrac).
Revision
36218 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Oct 9 09:13:31 2010 UTC (4 years, 3 months ago) by
avoigt
Original Path:
branches/dev/tmva/src/PDEFoamDistr.cxx
File length: 12600 byte(s)
Diff to
previous 35681
merge all changes from branch
root/dev/tmvaValidation/PDEFoamImprovements
They include:
(1)
Remove redundant information from class PDEFoamDistr, which is also
stored in the corresponding PDEFoam object. Instead of copying data
from PDEFoam to PDEFoamDistr, the latter now has a pointer to the
corresponding PDEFoam (its owner). It is used to obtain the foam
size, number of dimensions and the volume fraction used for the range
searching.
This avoids copying of redundant information, simplifies the code and
makes the class PDEFoamDistr more flexible and easier to extend.
Note that the versions of the classes PDEFoam and PDEFoamDistr is
increased by 1 each, because the class definition has changed (we
changed variables and some functions).
(2)
small code clean-up and adding of comments
Revision
35138 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Sep 4 09:46:09 2010 UTC (4 years, 4 months ago) by
avoigt
Original Path:
branches/dev/tmva/src/PDEFoamDistr.cxx
File length: 10941 byte(s)
Diff to
previous 34828
Merge changes from dev/tmvaValidation/ExtendedMethodBoost
Notes on the changes
--------------------
(1) PDEFoam.h/.cxx
- Add parameter 'MaxDepth' which avoids splitting a cell, which has a
certain depth within the cell tree
- Add parameter 'PeekMax'. If set to true, the cell with the maximum
driver integral is chosen for the next split. If set to false, the
last created cell will be split next (if cell contains more than
Nmin events and a depth < MaxDepth).
- Add parameter 'DTLogic' which switches to a decision tree like cell
splittin algorithm with a given separation type. A new function
'DTExplore' was added where the DT-like cell splitting is done.
(2) PDEFoamCell.h/.cxx
- Add function which returns the depth of the cell in the cell tree
(3) PDEFoamDistr.h/.cxx
- Add function, which fills all (signal/background) events, which lie
in a given cell, into cell edge histograms. It is used within
'PDEFoam::DTExplore()'.
(4) MethodPDEFoam.h/.cxx
- Add parameter 'MaxDepth' to cut on maximal depth of the cell tree
- Add parameter 'UseYesNoCell'. If set to true, the method returns -1
for background and 1 for signal events. If set to false, the method
returns the discriminant S/(S+B) from a foam cell.
- Add parameter 'FillFoamWithOrigWeights'. If set to true, the final
foam is filled with the original event weights. If set to false,
the final foam is filled with the full event weight (including the
boost weight).
- Add parameter 'DTLogic' to switch to a decision tree like cell split
algorithm using the given separation type
- Add parameter 'PeekMax' to control the 'PeekMax' parameter of
PDEFoam (see above).
(5) MethodBoost.h/.cxx
- Add new event weight types (boost types) 'HighEdgeGauss' and
'HighEdgeCoPara', which weight the events according to its MVA
value. 'HighEdgeGauss' strongly weights events which have a MVA
value close to the cut value, and 'HighEdgeCoPara' strongly weights
events which have a MVA value close to 0 or 1.
- Add new method weight types 'ByROC' and 'ByOverlap', which weight a
single classifier according to its ROC integral (on the training
sample) or according to the inverse overlap integral of the
classifiers signal and background MVA distributions (on the training
sample)
- Add control histograms which document the ROC integal of the full
boosted classifier and every single classifier on the training and
testing sample. (see boosting control plots in the TMVAGui.C)
- Add control histogram which documents the overlap integral of every
single classifier. Note that this histogram is not yet printed by
the boosting control plots macro.
- Add variable 'fMVAvalues' which stores the MVA values of the last
trained classifier on the training sample. This avoids
recalculating the MVA values at several points, which can be a
significant slowdown. (fMVAvalues is filled in 'CalcMVAValues'.)
- Add function 'GetBoostROCIntegral' which calculates the ROC
integrals for the full and single classifier (on training and
testing sample) as well as the overlap integral.
- Add function 'CalcMethodWeight' which calculates the weight of the
classifier. Now this is no longer done in 'SingleBoost()'.
Final note:
-----------
This commit does not include all changes from
dev/tmvaValidation/ExtendedMethodBoost. This is because some are not
suited to go into a future trunk. This includes the
'StopIfErrorIsTooBig' option of MethodBoost, which avoids stopping the
boost algorithm if the misclassification rate of the last trained
classifier excees 0.5. (The latter was implemented to study the
boosting in more detail.)
Revision
34691 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 1 08:47:49 2010 UTC (4 years, 5 months ago) by
avoigt
Original Path:
branches/dev/tmva/src/PDEFoamDistr.cxx
File length: 9033 byte(s)
Diff to
previous 34448
Bugfix: In PDEFoamDistr a static variable was declared, which was
shared upon all instances of PDEFoamDistr. However, this variable
should be unique for every instance of PDEFoam. The bug led to a
incorrect calculation of the event density if more than one instance
of PDEFoam was booked.
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.