91 SG_ERROR(
"Machine is set as CRandomCART and cannot be changed\n")
106 REQUIRE(
m_machine,
"m_machine is NULL. It is expected to be RandomCARTree\n")
112 REQUIRE(
m_machine,
"m_machine is NULL. It is expected to be RandomCARTree\n")
118 REQUIRE(
m_machine,
"m_machine is NULL. It is expected to be RandomCARTree\n")
124 REQUIRE(
m_machine,
"m_machine is NULL. It is expected to be RandomCARTree\n")
130 REQUIRE(
m_machine,
"m_machine is NULL. It is expected to be RandomCARTree\n")
131 REQUIRE(rand_featsize>0,
"feature subset size should be greater than 0\n")
138 REQUIRE(
m_machine,
"m_machine is NULL. It is expected to be RandomCARTree\n")
144 REQUIRE(m,
"Machine supplied is NULL\n")
151 if (m_weights.
vlen==0)
157 for (int32_t i=0;i<idx.
vlen;i++)
158 weights[i]=m_weights[idx[i]];
167 void CRandomForest::init()
static void fill_vector(T *vec, int32_t len, T value)
void set_weights(SGVector< float64_t > w)
void set_machine_problem_type(EProblemType mode)
The class Labels models labels, i.e. class assignments of objects.
void set_num_random_features(int32_t rand_featsize)
void set_machine_problem_type(EProblemType mode)
void set_feature_types(SGVector< bool > ft)
SGVector< bool > get_feature_types() const
A generic learning machine interface.
void set_weights(SGVector< float64_t > weights)
virtual void set_machine_parameters(CMachine *m, SGVector< index_t > idx)
void set_num_bags(int32_t num_bags)
This class implements randomized CART algorithm used in the tree growing process of candidate trees i...
virtual EProblemType get_machine_problem_type() const
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
virtual void set_machine(CMachine *machine)
: Bagging algorithm i.e. bootstrap aggregating
virtual void set_labels(CLabels *lab)
int32_t get_num_random_features() const
SGVector< float64_t > get_weights() const