48 REQUIRE(size>0,
"Subset size should be greater than 0. %d supplied!\n",size)
49 m_randsubset_size=size;
54 int32_t &count_right, int32_t subset_size,
const SGVector<index_t>& active_indices)
64 if (m_randsubset_size==0)
66 subset_size=m_randsubset_size;
68 REQUIRE(subset_size<=num_feats,
"The Feature subset size(set %d) should be less than"
69 " or equal to the total number of features(%d here).\n",subset_size,num_feats)
71 return CCARTree::compute_best_attribute(mat,weights,labels,left,right,is_left_final,num_missing_final,count_left,count_right,subset_size, active_indices);
75 void CRandomCARTree::init()
void set_feature_subset_size(int32_t size)
virtual int32_t compute_best_attribute(const SGMatrix< float64_t > &mat, const SGVector< float64_t > &weights, CLabels *labels, SGVector< float64_t > &left, SGVector< float64_t > &right, SGVector< bool > &is_left_final, int32_t &num_missing, int32_t &count_left, int32_t &count_right, int32_t subset_size=0, const SGVector< int32_t > &active_indices=SGVector< index_t >())
The class Labels models labels, i.e. class assignments of objects.
This class implements the Classification And Regression Trees algorithm by Breiman et al for decision...
all of classes and functions are contained in the shogun namespace
static float32_t sqrt(float32_t x)
virtual int32_t compute_best_attribute(const SGMatrix< float64_t > &mat, const SGVector< float64_t > &weights, CLabels *labels, SGVector< float64_t > &left, SGVector< float64_t > &right, SGVector< bool > &is_left_final, int32_t &num_missing, int32_t &count_left, int32_t &count_right, int32_t subset_size=0, const SGVector< int32_t > &active_indices=SGVector< index_t >())
virtual ~CRandomCARTree()