MINT2
src
Mojito
Chi2Test
HyperBinningMakerSmartRandomise.cpp
Go to the documentation of this file.
1
#include "
Mint/HyperBinningMakerSmartRandomise.h
"
2
3
4
5
HyperBinningMakerSmartRandomise::HyperBinningMakerSmartRandomise
(
const
HyperCuboid
& binningRange,
const
HyperPointSet
& data) :
6
HyperBinningMaker
(binningRange, data)
7
{
8
WELCOME_LOG
<<
"Good day from the HyperBinningMakerRandomise() Constructor"
<<std::endl;
9
}
10
11
void
HyperBinningMakerSmartRandomise::makeBinning
(){
12
13
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"Splitting all bins in random dimensions"
<<std::endl;
14
int
dimension =
_binningDimensions
.size();
15
16
int
nBins = 0;
17
int
unchanged = 0;
18
19
while
(
smartSplitAllRandomise
() != 0){
20
if
(nBins ==
getNumBins
()) unchanged++;
21
else
unchanged = 0;
22
if
(unchanged >= 2.0*dimension)
break
;
23
nBins =
getNumBins
();
24
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"There is now a total of "
<< nBins <<
" bins"
<<std::endl;
25
}
26
27
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"Random binning algorithm complete "
<<std::endl;
28
29
30
}
31
32
HyperBinningMakerSmartRandomise::~HyperBinningMakerSmartRandomise
(){
33
GOODBYE_LOG
<<
"Goodbye from the HyperBinningMakerRandomise() Constructor"
;
34
}
HyperCuboid
Definition:
HyperCuboid.h:28
INFO_LOG
#define INFO_LOG
Definition:
MessageService.h:160
HyperBinningMaker::s_printBinning
static bool s_printBinning
Definition:
HyperBinningMaker.h:52
HyperBinningMaker::getNumBins
int getNumBins() const
Definition:
HyperBinningMaker.cpp:1152
HyperBinningMakerSmartRandomise::HyperBinningMakerSmartRandomise
HyperBinningMakerSmartRandomise(const HyperCuboid &binningRange, const HyperPointSet &data)
Definition:
HyperBinningMakerSmartRandomise.cpp:5
HyperBinningMakerSmartRandomise.h
GOODBYE_LOG
#define GOODBYE_LOG
Definition:
MessageService.h:162
HyperBinningMakerSmartRandomise::makeBinning
virtual void makeBinning()
Definition:
HyperBinningMakerSmartRandomise.cpp:11
WELCOME_LOG
#define WELCOME_LOG
Definition:
MessageService.h:158
HyperBinningMaker
Definition:
HyperBinningMaker.h:43
HyperPointSet
Definition:
HyperPointSet.h:31
HyperBinningMakerSmartRandomise::~HyperBinningMakerSmartRandomise
~HyperBinningMakerSmartRandomise()
Definition:
HyperBinningMakerSmartRandomise.cpp:32
HyperBinningMaker::_binningDimensions
std::vector< int > _binningDimensions
Definition:
HyperBinningMaker.h:90
HyperBinningMaker::smartSplitAllRandomise
int smartSplitAllRandomise(double dataFraction=0.5)
Definition:
HyperBinningMaker.cpp:1074
Generated by
1.8.15