90 SG_ERROR(
"NULL returned by apply method\n");
92 float64_t* bag_results = output.get_column_vector(i);
192 "Combination rule to use for aggregating",
MS_AVAILABLE);
267 output.set_const(
NAN);
287 SG_ERROR(
"NULL returned by apply method\n");
290 for (
index_t j = 0; j < oob.vlen; j++)
291 output(oob[j], i) = lv[j];
308 for (int32_t i=0;i<lab.vlen;i++)
327 SG_ERROR(
"Unsupported label type\n");
347 if (out_of_bag[in_bag[i]])
349 out_of_bag[in_bag[i]] =
false;
356 for (
index_t i = 0; i < out_of_bag.vlen; i++)
virtual CRegressionLabels * apply_regression(CFeatures *data=NULL)
T get_element(int32_t index) const
void register_parameters()
void set_combination_rule(CCombinationRule *rule)
virtual ELabelType get_label_type() const =0
Real Labels are real-valued labels.
CCombinationRule * m_combination_rule
CCombinationRule * get_combination_rule() const
The class Labels models labels, i.e. class assignments of objects.
virtual CSGObject * clone()
virtual int32_t get_num_labels() const =0
real valued labels (e.g. for regression, classifier outputs)
virtual bool train_machine(CFeatures *data=NULL)
multi-class labels 0,1,...
virtual void set_machine_parameters(CMachine *m, SGVector< index_t > idx)
virtual int32_t get_bag_size() const
virtual float64_t evaluate(CLabels *predicted, CLabels *ground_truth)=0
virtual int32_t get_num_vectors() const =0
void random(T min_value, T max_value)
int32_t get_num_bags() const
int32_t get_num_elements() const
CDynamicArray< index_t > * get_oob_indices(const SGVector< index_t > &in_bag)
SGVector< float64_t > apply_get_outputs(CFeatures *data)
int32_t get_num_elements() const
Template Dynamic array class that creates an array that can be used like a list or an array...
virtual CMulticlassLabels * apply_multiclass(CFeatures *data=NULL)
A generic learning machine interface.
SGVector< bool > m_all_oob_idx
CMachine * get_machine() const
virtual SGVector< float64_t > combine(const SGMatrix< float64_t > &ensemble_result) const =0
Multiclass Labels for multi-class classification.
Class SGObject is the base class of all shogun objects.
void push_back(T element)
virtual void set_machine(CMachine *machine)
virtual ~CBaggingMachine()
Template Dynamic array class that creates an array that can be used like a list or an array...
virtual void remove_subset()
CDynamicObjectArray * m_bags
virtual CLabels * get_labels()
virtual void add_subset(SGVector< index_t > subset)
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
void set_num_bags(int32_t num_bags)
CDynamicObjectArray * m_oob_indices
all of classes and functions are contained in the shogun namespace
virtual void remove_subset()
The class Features is the base class of all feature objects.
CombinationRule abstract class The CombinationRule defines an interface to how to combine the classif...
virtual bool train(CFeatures *data=NULL)
int32_t get_num_elements() const
Binary Labels for binary classification.
CSGObject * get_element(int32_t index) const
void push_back(CSGObject *e)
Dense integer or floating point labels.
virtual CBinaryLabels * apply_binary(CFeatures *data=NULL)
float64_t get_oob_error(CEvaluation *eval) const
virtual void set_labels(CLabels *lab)
Class Evaluation, a base class for other classes used to evaluate labels, e.g. accuracy of classifica...
void set_const(T const_elem)
virtual void add_subset(SGVector< index_t > subset)
virtual void set_bag_size(int32_t bag_size)
virtual CLabels * apply(CFeatures *data=NULL)