The AllCategoricalSplit is a splitting function that will split categorical features into many children: one child for each category.  
 More...
|  | 
| template<typename ElemType > | 
| static size_t | CalculateDirection (const ElemType &point, const arma::Col< ElemType > &classProbabilities, const AuxiliarySplitInfo< ElemType > &) | 
|  | Calculate the direction a point should percolate to.  More... 
 | 
|  | 
| template<typename ElemType > | 
| static size_t | NumChildren (const arma::Col< ElemType > &classProbabilities, const AuxiliarySplitInfo< ElemType > &) | 
|  | Return the number of children in the split.  More... 
 | 
|  | 
| template<typename VecType > | 
| static double | SplitIfBetter (const double bestGain, const VecType &data, const size_t numCategories, const arma::Row< size_t > &labels, const size_t numClasses, const size_t minimumLeafSize, arma::Col< typename VecType::elem_type > &classProbabilities, AuxiliarySplitInfo< typename VecType::elem_type > &aux) | 
|  | Check if we can split a node.  More... 
 | 
|  | 
template<typename FitnessFunction>
class mlpack::tree::AllCategoricalSplit< FitnessFunction >
The AllCategoricalSplit is a splitting function that will split categorical features into many children: one child for each category. 
- Template Parameters
- 
  
    | FitnessFunction | Fitness function to evaluate gain with. |  
 
Definition at line 23 of file all_categorical_split.hpp.
template<typename FitnessFunction > 
template<typename ElemType > 
 
Calculate the direction a point should percolate to. 
- Parameters
- 
  
    | classProbabilities | Auxiliary information for the split. |  | aux | (Unused) auxiliary information for the split. |  
 
 
 
template<typename FitnessFunction > 
template<typename ElemType > 
 
Return the number of children in the split. 
- Parameters
- 
  
    | classProbabilities | Auxiliary information for the split. |  | aux | (Unused) auxiliary information for the split. |  
 
 
 
template<typename FitnessFunction > 
template<typename VecType > 
  
  | 
        
          | static double mlpack::tree::AllCategoricalSplit< FitnessFunction >::SplitIfBetter | ( | const double | bestGain, |  
          |  |  | const VecType & | data, |  
          |  |  | const size_t | numCategories, |  
          |  |  | const arma::Row< size_t > & | labels, |  
          |  |  | const size_t | numClasses, |  
          |  |  | const size_t | minimumLeafSize, |  
          |  |  | arma::Col< typename VecType::elem_type > & | classProbabilities, |  
          |  |  | AuxiliarySplitInfo< typename VecType::elem_type > & | aux |  
          |  | ) |  |  |  | static | 
 
Check if we can split a node. 
If we can split a node in a way that improves on 'bestGain', then we return the improved gain. Otherwise we return the value 'bestGain'. If a split is made, then classProbabilities and aux may be modified. For this particular split type, aux will be empty and classProbabilities will hold one element—the number of children.
- Parameters
- 
  
    | bestGain | Best gain seen so far (we'll only split if we find gain better than this). |  | data | The dimension of data points to check for a split in. |  | numCategories | Number of categories in the categorical data. |  | labels | Labels for each point. |  | numClasses | Number of classes in the dataset. |  | minimumLeafSize | Minimum number of points in a leaf node for splitting. |  | classProbabilities | Class probabilities vector, which may be filled with split information a successful split. |  | aux | Auxiliary split information, which may be modified on a successful split. |  
 
 
 
The documentation for this class was generated from the following file: