31 #ifndef _StochasticGBMachine_H__
32 #define _StochasticGBMachine_H__
73 virtual const char*
get_name()
const {
return "StochasticGBMachine"; }
virtual CRegressionLabels * apply_regression(CFeatures *data=NULL)
Real Labels are real-valued labels.
Class CLossFunction is the base class of all loss functions.
The class Labels models labels, i.e. class assignments of objects.
virtual void set_loss_function(CLossFunction *f)
float64_t get_subset_fraction() const
A generic learning machine interface.
CMachine * get_machine() const
This class implements the stochastic gradient boosting algorithm for ensemble learning invented by Je...
CRegressionLabels * compute_pseudo_residuals(CRegressionLabels *inter_f)
float64_t m_learning_rate
virtual ~CStochasticGBMachine()
static float64_t lbfgs_evaluate(void *obj, const float64_t *parameters, float64_t *gradient, const int dim, const float64_t step)
float64_t compute_multiplier(CRegressionLabels *f, CRegressionLabels *hm)
void set_machine(CMachine *machine)
CMachine * fit_model(CDenseFeatures< float64_t > *feats, CRegressionLabels *labels)
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
void set_subset_fraction(float64_t frac)
void set_num_iterations(int32_t iter)
virtual const char * get_name() const
void set_learning_rate(float64_t lr)
void initialize_learners()
all of classes and functions are contained in the shogun namespace
CStochasticGBMachine(CMachine *machine=NULL, CLossFunction *loss=NULL, int32_t num_iterations=100, float64_t learning_rate=1.0, float64_t subset_fraction=0.6)
float64_t get_learning_rate() const
CDynamicArray< float64_t > * m_gamma
The class Features is the base class of all feature objects.
float64_t get_gamma(void *instance)
int32_t get_num_iterations() const
virtual bool train_machine(CFeatures *data=NULL)
void apply_subset(CDenseFeatures< float64_t > *f, CLabels *interf)
virtual CLossFunction * get_loss_function() const
CDynamicObjectArray * m_weak_learners