1 #ifndef mitkImpurityLoss_h
2 #define mitkImpurityLoss_h
4 #include <vigra/multi_array.hxx>
5 #include <vigra/random_forest.hxx>
9 template <
class TLossFunction = vigra::GiniCriterion,
class TLabelContainer = vigra::MultiArrayView<2,
int>,
class TWeightContainer = vigra::MultiArrayView<2,
double> >
18 vigra::ProblemSpec<T>
const &ext);
22 template <
class TDataIterator>
23 double Increment(TDataIterator begin, TDataIterator end);
25 template <
class TDataIterator>
26 double Decrement(TDataIterator begin, TDataIterator end);
28 template <
class TArray>
29 double Init(TArray initCounts);
31 vigra::ArrayVector<double>
const&
Response();
40 bool m_UsePointWeights;
41 TWeightContainer m_PointWeights;
44 TLabelContainer
const& m_Labels;
45 vigra::ArrayVector<double> m_Counts;
46 vigra::ArrayVector<double> m_ClassWeights;
48 TLossFunction m_LossFunction;
53 #include <../src/Splitter/mitkImpurityLoss.cpp>
55 #endif //mitkImpurityLoss_h
void UsePointWeights(bool useWeights)
TLabelContainer LabelContainerType
DataCollection - Class to facilitate loading/accessing structured data.
void SetPointWeights(TWeightContainer weight)
double Decrement(TDataIterator begin, TDataIterator end)
vigra::ArrayVector< double > const & Response()
ImpurityLoss(TLabelContainer const &labels, vigra::ProblemSpec< T > const &ext)
double Increment(TDataIterator begin, TDataIterator end)
WeightContainerType GetPointWeights()
double Init(TArray initCounts)
bool IsUsingPointWeights()
TWeightContainer WeightContainerType