SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StructuredOutputMachine.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 Fernando José Iglesias García
8  * Copyright (C) 2012 Fernando José Iglesias García
9  */
10 
12 
13 using namespace shogun;
14 
16 : CMachine(), m_model(NULL), m_loss(NULL)
17 {
18  register_parameters();
19 }
20 
22  CStructuredModel* model,
23  CLossFunction* loss,
24  CStructuredLabels* labs)
25 : CMachine(), m_model(model), m_loss(loss)
26 {
27  SG_REF(m_model);
28  SG_REF(m_loss);
29  set_labels(labs);
30  register_parameters();
31 }
32 
34 {
37 }
38 
40 {
42  SG_REF(model);
43  m_model = model;
44 }
45 
47 {
49  SG_REF(loss);
50  m_loss = loss;
51 }
52 
53 void CStructuredOutputMachine::register_parameters()
54 {
55  SG_ADD((CSGObject**)&m_model, "m_model", "Structured model", MS_NOT_AVAILABLE);
56  SG_ADD((CSGObject**)&m_loss, "m_loss", "Structured loss", MS_NOT_AVAILABLE);
57 }

SHOGUN Machine Learning Toolbox - Documentation