SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MulticlassStrategy.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  * Written (W) 2012 Chiyuan Zhang
8  * Written (W) 2013 Shell Hu and Heiko Strathmann
9  * Copyright (C) 2012 Chiyuan Zhang
10  */
11 
14 
15 using namespace shogun;
16 
17 
19  : CSGObject()
20 {
21  init();
22 }
23 
25  : CSGObject()
26 {
27  init();
28 
29  m_prob_heuris=prob_heuris;
30 }
31 
32 void CMulticlassStrategy::init()
33 {
35  m_train_labels=NULL;
36  m_orig_labels=NULL;
37  m_train_iter=0;
39  m_num_classes=0;
40 
41  SG_ADD((CSGObject**)&m_rejection_strategy, "rejection_strategy", "Strategy of rejection", MS_NOT_AVAILABLE);
42  SG_ADD(&m_num_classes, "num_classes", "Number of classes", MS_NOT_AVAILABLE);
43  SG_ADD((machine_int_t*)&m_prob_heuris, "prob_heuris", "Probability estimation heuristics", MS_NOT_AVAILABLE);
44 }
45 
47 {
48  if (m_train_labels != NULL)
49  SG_ERROR("Stop the previous training task before starting a new one!")
50  SG_REF(train_labels);
51  m_train_labels=train_labels;
52  SG_REF(orig_labels);
53  m_orig_labels=orig_labels;
54  m_train_iter=0;
55 }
56 
58 {
59  m_train_iter++;
60  return SGVector<int32_t>();
61 }
62 
64 {
67  m_train_labels = NULL;
68  m_orig_labels = NULL;
69 }

SHOGUN Machine Learning Toolbox - Documentation