31 evaluation_criterion, autolock)
50 void CCrossValidation::init()
63 "classes for intermediade cross-validation results",
104 SG_WARNING(
"%s does not support locking. Autolocking is skipped. "
105 "Set autolock flag to false to get rid of warning.\n",
141 SG_DEBUG(
"entering cross-validation run %d \n", i)
143 SG_DEBUG(
"result of cross-validation run %d is %f\n", i, results[i])
179 if (conf_int_alpha <0 || conf_int_alpha>= 1) {
180 SG_ERROR(
"%f is an illegal alpha-value for confidence interval of "
181 "cross-validation\n", conf_int_alpha);
186 SG_WARNING(
"Confidence interval for Cross-Validation only possible"
187 " when number of runs is >1, ignoring.\n");
196 SG_ERROR(
"%d is an illegal number of repetitions\n", num_runs)
206 SG_DEBUG(
"building index sets for %d-fold cross-validation\n", num_subsets)
219 for (
index_t i=0; i <num_subsets; ++i)
296 for (
index_t i=0; i <num_subsets; ++i)
327 inverse_subset_indices.
vlen,
"training indices");
361 subset_indices.
vlen,
"test indices");
374 SG_DEBUG(
"result on fold %d is %f\n", i, results[i])
virtual void update_fold_index(index_t fold_index, const char *prefix="")
virtual void build_subsets()=0
index_t get_num_subsets() const
virtual void update_train_indices(SGVector< index_t > indices, const char *prefix="")
virtual bool init(CFeatures *features)=0
CSGObject * get_next_element()
virtual CLabels * apply_locked(SGVector< index_t > indices)
The class Labels models labels, i.e. class assignments of objects.
void set_conf_int_alpha(float64_t m_conf_int_alpha)
static float64_t confidence_intervals_mean(SGVector< float64_t > values, float64_t alpha, float64_t &conf_int_low, float64_t &conf_int_up)
virtual CEvaluationResult * evaluate()
virtual float64_t evaluate(CLabels *predicted, CLabels *ground_truth)=0
virtual void update_test_true_result(CLabels *results, const char *prefix="")
Abstract base class for all splitting types. Takes a CLabels instance and generates a desired number ...
virtual void init_num_runs(index_t num_runs, const char *prefix="")
CEvaluation * m_evaluation_criterion
virtual void update_test_indices(SGVector< index_t > indices, const char *prefix="")
CPreprocessor * get_preprocessor(int32_t num) const
type to encapsulate the results of an evaluation run. May contain confidence interval (if conf_int_al...
virtual const char * get_name() const
virtual bool train_locked(SGVector< index_t > indices)
void set_num_runs(int32_t num_runs)
A generic learning machine interface.
virtual void set_indices(SGVector< index_t > indices)
void display_vector(const char *name="vector", const char *prefix="") const
int32_t get_num_preprocessors() const
virtual void update_trained_machine(CMachine *machine, const char *prefix="")
CSGObject * get_first_element()
virtual void set_store_model_features(bool store_model)
Class for managing individual folds in cross-validation.
Class SGObject is the base class of all shogun objects.
virtual void data_unlock()
float64_t m_conf_int_alpha
virtual const char * get_name() const
virtual void data_lock(CLabels *labs, CFeatures *features)
virtual void remove_subset()
Abstract class that contains the result generated by the MachineEvaluation class. ...
Machine Evaluation is an abstract class that evaluates a machine according to some criterion...
virtual void add_subset(SGVector< index_t > subset)
SGVector< index_t > generate_subset_inverse(index_t subset_idx)
static floatmax_t mean(SGVector< T > vec)
EMessageType get_loglevel() const
virtual void update_test_result(CLabels *results, const char *prefix="")
virtual bool supports_locking() const
virtual void post_update_results()
virtual float64_t evaluate_one_run()
all of classes and functions are contained in the shogun namespace
virtual ~CCrossValidation()
SGVector< index_t > generate_subset_indices(index_t subset_idx)
virtual void remove_subset()
virtual void update_evaluation_result(float64_t result, const char *prefix="")
The class Features is the base class of all feature objects.
bool append_element(CSGObject *data)
virtual bool train(CFeatures *data=NULL)
Class Preprocessor defines a preprocessor interface.
void add_cross_validation_output(CCrossValidationOutput *cross_validation_output)
virtual void init_expose_labels(CLabels *labels)
virtual void set_labels(CLabels *lab)
bool is_data_locked() const
virtual void init_num_folds(index_t num_folds, const char *prefix="")
virtual void update_run_index(index_t run_index, const char *prefix="")
Class Evaluation, a base class for other classes used to evaluate labels, e.g. accuracy of classifica...
CSplittingStrategy * m_splitting_strategy
virtual void add_subset(SGVector< index_t > subset)
Class List implements a doubly connected list for low-level-objects.
virtual CLabels * apply(CFeatures *data=NULL)