Information Gain calculation using Shannon entropy of the parent and child nodes.
More...
#include <score.h>
Static Public Member Functions |
template<class W > |
__host__ static __device__
ScoreType | calculateScore (const size_t numLabels, const W *leftClasses, const W *rightClasses, const unsigned int leftRightStride, const W *allClasses, const ScoreType totalLeft, const ScoreType totalRight) |
Static Protected Member Functions |
__host__ static __device__
ScoreType | entropy (const ScoreType prob) |
__host__ static __device__
ScoreType | normalizeScore (const ScoreType score) |
Detailed Description
Information Gain calculation using Shannon entropy of the parent and child nodes.
Definition at line 18 of file score.h.
Member Function Documentation
template<class W >
__host__ static __device__ ScoreType curfil::InformationGainScore::calculateScore |
( |
const size_t |
numLabels, |
|
|
const W * |
leftClasses, |
|
|
const W * |
rightClasses, |
|
|
const unsigned int |
leftRightStride, |
|
|
const W * |
allClasses, |
|
|
const ScoreType |
totalLeft, |
|
|
const ScoreType |
totalRight |
|
) |
| |
|
inlinestatic |
__host__ static __device__ ScoreType curfil::InformationGainScore::entropy |
( |
const ScoreType |
prob | ) |
|
|
inlinestaticprotected |
- Returns
- entropy calculated using the given probability
Definition at line 26 of file score.h.
__host__ static __device__ ScoreType curfil::InformationGainScore::normalizeScore |
( |
const ScoreType |
score | ) |
|
|
inlinestaticprotected |
- Returns
- score in the interval [0,1]
Definition at line 37 of file score.h.
The documentation for this class was generated from the following file: