[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
BestGiniOfColumn< LineSearchLossTag > Class Template Reference |
#include <vigra/random_forest/rf_split.hxx>
Public Member Functions | |
template<class DataSourceF_t , class DataSource_t , class I_Iter , class Array > | |
void | operator() (DataSourceF_t const &column, DataSource_t const &labels, I_Iter &begin, I_Iter &end, Array const ®ion_response) |
Given a column, choose a split that minimizes some loss
void operator() | ( | DataSourceF_t const & | column, |
DataSource_t const & | labels, | ||
I_Iter & | begin, | ||
I_Iter & | end, | ||
Array const & | region_response | ||
) |
calculate the best gini split along a Feature Column
column | the feature vector - has to support the [] operator |
labels | the label vector |
begin | |
end | (in and out) begin and end iterators to the indices of the samples in the current region. the range begin - end is sorted by the column supplied during function execution. |
region_response | ??? class histogram of the range. |
precondition: begin, end valid range, class_counts positive integer valued array with the class counts in the current range. labels.size() >= max(begin, end); postcondition: begin, end sorted by column given. min_gini_ contains the minimum gini found or NumericTraits<double>::max if no split was found. min_index_ contains the splitting index in the range or invalid data if no split was found. BestCirremtcounts[0] and [1] contain the class histogram of the left and right region of the left and right regions.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|