SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
21 
22 using namespace shogun;
23 
25 {
26  init();
27 }
28 
30  CLabels* labels, CSplittingStrategy* splitting_strategy,
31  CEvaluation* evaluation_criterion, bool autolock)
32 {
33  init();
34 
35  m_machine = machine;
36  m_features = features;
37  m_labels = labels;
38  m_splitting_strategy = splitting_strategy;
39  m_evaluation_criterion = evaluation_criterion;
40  m_autolock = autolock;
41 
47 }
48 
50  CSplittingStrategy* splitting_strategy,
51  CEvaluation* evaluation_criterion, bool autolock)
52 {
53  init();
54 
55  m_machine = machine;
56  m_labels = labels;
57  m_splitting_strategy = splitting_strategy;
58  m_evaluation_criterion = evaluation_criterion;
59  m_autolock = autolock;
60 
65 }
66 
68 {
74 }
75 
77 {
78  m_machine = NULL;
79  m_features = NULL;
80  m_labels = NULL;
81  m_splitting_strategy = NULL;
83  m_do_unlock = false;
84  m_autolock = true;
85 
86  SG_ADD((CSGObject**)&m_machine, "machine", "Used learning machine",
88  SG_ADD((CSGObject**)&m_features, "features", "Used features",
90  SG_ADD((CSGObject**)&m_labels, "labels", "Used labels",
92  SG_ADD((CSGObject**)&m_splitting_strategy, "splitting_strategy",
93  "Used splitting strategy", MS_NOT_AVAILABLE);
94  SG_ADD((CSGObject**)&m_evaluation_criterion, "evaluation_criterion",
95  "Used evaluation criterion", MS_NOT_AVAILABLE);
96  SG_ADD(&m_do_unlock, "do_unlock",
97  "Whether machine should be unlocked after evaluation",
99  SG_ADD(&m_autolock, "m_autolock",
100  "Whether machine should automatically try to be locked before ",
102 
103  /* new parameter from param version 0 to 1 */
105  new SGParamInfo("m_do_unlock", CT_SCALAR, ST_NONE, PT_BOOL, 1),
106  new SGParamInfo()
107  );
108 
109  /* new parameter from param version 0 to 1 */
111  new SGParamInfo("m_autolock", CT_SCALAR, ST_NONE, PT_BOOL, 1),
112  new SGParamInfo()
113  );
114 }
115 
117 {
118  SG_REF(m_machine);
119  return m_machine;
120 }
121 
123 {
125 }

SHOGUN Machine Learning Toolbox - Documentation