Classes | Functions | Variables
lem::dec Namespace Reference

Decision tree PID. More...

Classes

class  Cut
 A cut dividing events into two samples, maximizing FOM. More...
 
struct  Evt
 A training or trial event for the decision tree. More...
 
class  Forest
 "Random forest" of decision trees More...
 
class  Leaf
 Leaf of a decision tree. No further cuts are made More...
 
struct  ThreadArgs
 
class  Tree
 A DecisionTree. Forwards most things to the head TreeNode. More...
 
class  TreeNode
 Abstract base class for tree cuts and leaves. More...
 

Functions

Evt TransformEvent (const Evt &evt, const TMatrixD &mat)
 
voidthread_func (void *a)
 

Variables

const unsigned int kDepthLimit = 20
 Don't build a tree deeper than this. More...
 
const unsigned int kMinBucketSize = 20
 Once there are less than this many events in a subtree, stop subdividing. More...
 
const int kNumPIDVars = 6
 

Detailed Description

Decision tree PID.

Function Documentation

void* lem::dec::thread_func ( void a)

Definition at line 196 of file DecisionTree.cxx.

References runNovaSAM::args, lem::dec::ThreadArgs::evts, lem::dec::ThreadArgs::scale, lem::dec::Forest::TrainSingle(), and lem::dec::ThreadArgs::trans.

Referenced by lem::dec::Forest::Forest().

197  {
198  ThreadArgs* args = (ThreadArgs*)a;
199  return Forest::TrainSingle(*args->evts, args->scale, args->trans);
200  }
const double a
Evt lem::dec::TransformEvent ( const Evt evt,
const TMatrixD mat 
)

Definition at line 177 of file DecisionTree.cxx.

References MECModelEnuComparisons::i, kNumPIDVars, runNovaSAM::ret, and lem::dec::Evt::vars.

Referenced by lem::dec::Tree::Classify(), and lem::dec::Forest::TrainSingle().

178  {
180  for(int i = 0; i < kNumPIDVars; ++i) vec[i] = evt.vars[i];
181  vec[kNumPIDVars] = 1;
182  vec = mat*vec;
183 
184  Evt ret = evt;
185  for(int i = 0; i < kNumPIDVars; ++i) ret.vars[i] = vec[i];
186  return ret;
187  }
const int kNumPIDVars
Definition: DecisionTree.h:23
Eigen::VectorXd vec

Variable Documentation

const unsigned int lem::dec::kDepthLimit = 20

Don't build a tree deeper than this.

Definition at line 351 of file DecisionTree.cxx.

const unsigned int lem::dec::kMinBucketSize = 20

Once there are less than this many events in a subtree, stop subdividing.

Definition at line 353 of file DecisionTree.cxx.

const int lem::dec::kNumPIDVars = 6