[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
vigra::rf::algorithms Namespace Reference |
Classes | |
class | ClusterImportanceVisitor |
class | CorrectStatus |
class | Draw |
class | GetClusterVariables |
struct | HC_Entry |
class | HClustering |
class | NormalizeStatus |
class | PermuteCluster |
class | RFErrorCallback |
class | VariableSelectionResult |
Functions | |
template<class FeatureT , class ResponseT , class ErrorRateCallBack > | |
void | backward_elimination (FeatureT const &features, ResponseT const &response, VariableSelectionResult &result, ErrorRateCallBack errorcallback) |
template<class FeatureT , class ResponseT > | |
void | cluster_permutation_importance (FeatureT const &features, ResponseT const &response, HClustering &linkage, MultiArray< 2, double > &distance) |
template<class FeatureT , class ResponseT , class ErrorRateCallBack > | |
void | forward_selection (FeatureT const &features, ResponseT const &response, VariableSelectionResult &result, ErrorRateCallBack errorcallback) |
template<class FeatureT , class ResponseT , class ErrorRateCallBack > | |
void | rank_selection (FeatureT const &features, ResponseT const &response, VariableSelectionResult &result, ErrorRateCallBack errorcallback) |
This namespace contains all algorithms developed for feature selection
void vigra::rf::algorithms::forward_selection | ( | FeatureT const & | features, |
ResponseT const & | response, | ||
VariableSelectionResult & | result, | ||
ErrorRateCallBack | errorcallback | ||
) |
Perform forward selection
features | IN: n x p matrix containing n instances with p attributes/features used in the variable selection algorithm |
response | IN: n x 1 matrix containing the corresponding response |
result | IN/OUT: VariableSelectionResult struct which will contain the results of the algorithm. Features between result.selected.begin() and result.pivot will be left untouched. |
errorcallback | IN, OPTIONAL: Functor that returns the error rate given a set of features and labels. Default is the RandomForest OOB Error. |
Forward selection subsequently chooses the next feature that decreases the Error rate most.
usage:
To use forward selection but ensure that a specific feature e.g. feature 5 is always included one would do the following
void vigra::rf::algorithms::backward_elimination | ( | FeatureT const & | features, |
ResponseT const & | response, | ||
VariableSelectionResult & | result, | ||
ErrorRateCallBack | errorcallback | ||
) |
Perform backward elimination
features | IN: n x p matrix containing n instances with p attributes/features used in the variable selection algorithm |
response | IN: n x 1 matrix containing the corresponding response |
result | IN/OUT: VariableSelectionResult struct which will contain the results of the algorithm. Features between result.pivot and result.selected.end() will be left untouched. |
errorcallback | IN, OPTIONAL: Functor that returns the error rate given a set of features and labels. Default is the RandomForest OOB Error. |
Backward elimination subsequently eliminates features that have the least influence on the error rate
usage:
To use backward elimination but ensure that a specific feature e.g. feature 5 is always excluded one would do the following:
void vigra::rf::algorithms::rank_selection | ( | FeatureT const & | features, |
ResponseT const & | response, | ||
VariableSelectionResult & | result, | ||
ErrorRateCallBack | errorcallback | ||
) |
Perform rank selection using a predefined ranking
features | IN: n x p matrix containing n instances with p attributes/features used in the variable selection algorithm |
response | IN: n x 1 matrix containing the corresponding response |
result | IN/OUT: VariableSelectionResult struct which will contain the results of the algorithm. The struct should be initialized with the predefined ranking. |
errorcallback | IN, OPTIONAL: Functor that returns the error rate given a set of features and labels. Default is the RandomForest OOB Error. |
Often some variable importance, score measure is used to create the ordering in which variables have to be selected. This method takes such a ranking and calculates the corresponding error rates.
usage:
void vigra::rf::algorithms::cluster_permutation_importance | ( | FeatureT const & | features, |
ResponseT const & | response, | ||
HClustering & | linkage, | ||
MultiArray< 2, double > & | distance | ||
) |
Perform hierarchical clustering of variables and assess importance of clusters
features | IN: n x p matrix containing n instances with p attributes/features used in the variable selection algorithm |
response | IN: n x 1 matrix containing the corresponding response |
linkage | OUT: Hierarchical grouping of variables. |
distance | OUT: distance matrix used for creating the linkage |
Performs Hierarchical clustering of variables. And calculates the permutation importance measures of each of the clusters. Use the Draw functor to create human readable output The cluster-permutation importance measure corresponds to the normal permutation importance measure with all columns corresponding to a cluster permuted. The importance measure for each cluster is stored as the status() field of each clusternode
usage:
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|