ROOT
6.07/09
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
tmva
tmva
src
MisClassificationError.cxx
Go to the documentation of this file.
1
// @(#)root/tmva $Id$
2
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
3
4
/**********************************************************************************
5
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6
* Package: TMVA *
7
* Class : MisClassificationError *
8
* Web : http://tmva.sourceforge.net *
9
* *
10
* Description: Implementation of the MisClassificationError as separation *
11
* criterion: 1-max(p, 1-p) as
12
* *
13
* Authors (alphabetical): *
14
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
16
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
17
* *
18
* Copyright (c) 2005: *
19
* CERN, Switzerland *
20
* U. of Victoria, Canada *
21
* Heidelberg U., Germany *
22
* *
23
* Redistribution and use in source and binary forms, with or without *
24
* modification, are permitted according to the terms listed in LICENSE *
25
* (http://tmva.sourceforge.net/LICENSE) *
26
**********************************************************************************/
27
28
//_______________________________________________________________________
29
//
30
// Implementation of the MisClassificationError as separation criterion
31
//
32
//_______________________________________________________________________
33
34
35
#include "
TMVA/MisClassificationError.h
"
36
37
#include "
Rtypes.h
"
38
39
ClassImp
(
TMVA::MisClassificationError
)
40
41
////////////////////////////////////////////////////////////////////////////////
42
/// Misclassifiacton error criterion: 1-max(p, 1-p) (p: purity= s/(s+b))
43
44
Double_t
TMVA
::
MisClassificationError
::GetSeparationIndex( const
Double_t
&s, const
Double_t
&
b
)
45
{
46
if
( s+b <= 0)
return
0;
47
48
Double_t
p = s/(s+
b
);
49
if
(p >= 1-p)
return
1-p;
50
else
return
p;
51
}
52
53
Rtypes.h
MisClassificationError.h
TMVA::MisClassificationError
Definition:
MisClassificationError.h:48
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:279
Double_t
double Double_t
Definition:
RtypesCore.h:55
TMVA
Abstract ClassifierFactory template that handles arbitrary types.
Definition:
GeneticMinimizer.h:21
b
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition:
TRolke.cxx:630