SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
MachineEvaluation.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Copyright (C) 2012 Jacob Walker
8  *
9  * Some code adapted from CrossValidation class by
10  * Heiko Strathmann
11  */
12 
13 #include "MachineEvaluation.h"
15 #include <shogun/machine/Machine.h>
18 #include <shogun/base/Parameter.h>
20 
21 using namespace shogun;
22 
24 {
25  init();
26 }
27 
29  CLabels* labels, CSplittingStrategy* splitting_strategy,
30  CEvaluation* evaluation_criterion, bool autolock)
31 {
32  init();
33 
34  m_machine = machine;
35  m_features = features;
36  m_labels = labels;
37  m_splitting_strategy = splitting_strategy;
38  m_evaluation_criterion = evaluation_criterion;
39  m_autolock = autolock;
40 
46 }
47 
49  CSplittingStrategy* splitting_strategy,
50  CEvaluation* evaluation_criterion, bool autolock)
51 {
52  init();
53 
54  m_machine = machine;
55  m_labels = labels;
56  m_splitting_strategy = splitting_strategy;
57  m_evaluation_criterion = evaluation_criterion;
58  m_autolock = autolock;
59 
64 }
65 
67 {
73 }
74 
76 {
77  m_machine = NULL;
78  m_features = NULL;
79  m_labels = NULL;
80  m_splitting_strategy = NULL;
82  m_do_unlock = false;
83  m_autolock = true;
84 
85  SG_ADD((CSGObject**)&m_machine, "machine", "Used learning machine",
87  SG_ADD((CSGObject**)&m_features, "features", "Used features",
89  SG_ADD((CSGObject**)&m_labels, "labels", "Used labels",
91  SG_ADD((CSGObject**)&m_splitting_strategy, "splitting_strategy",
92  "Used splitting strategy", MS_NOT_AVAILABLE);
93  SG_ADD((CSGObject**)&m_evaluation_criterion, "evaluation_criterion",
94  "Used evaluation criterion", MS_NOT_AVAILABLE);
95  SG_ADD(&m_do_unlock, "do_unlock",
96  "Whether machine should be unlocked after evaluation",
98  SG_ADD(&m_autolock, "m_autolock",
99  "Whether machine should automatically try to be locked before ",
101 
102 }
103 
105 {
106  SG_REF(m_machine);
107  return m_machine;
108 }
109 
111 {
113 }
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
virtual EEvaluationDirection get_evaluation_direction() const =0
Abstract base class for all splitting types. Takes a CLabels instance and generates a desired number ...
#define SG_REF(x)
Definition: SGObject.h:54
A generic learning machine interface.
Definition: Machine.h:143
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:115
CMachine * get_machine() const
EEvaluationDirection
Definition: Evaluation.h:29
EEvaluationDirection get_evaluation_direction()
#define SG_UNREF(x)
Definition: SGObject.h:55
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
#define SG_ADD(...)
Definition: SGObject.h:84
Class Evaluation, a base class for other classes used to evaluate labels, e.g. accuracy of classifica...
Definition: Evaluation.h:40
CSplittingStrategy * m_splitting_strategy

SHOGUN Machine Learning Toolbox - Documentation