SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FactorGraphLabels.h
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) 2013 Shell Hu
8  * Copyright (C) 2013 Shell Hu
9  */
10 
11 #ifndef __FACTORGRAPH_LABELS_H__
12 #define __FACTORGRAPH_LABELS_H__
13 
15 #include <shogun/lib/SGVector.h>
18 
19 namespace shogun
20 {
21 
22 class CFactorGraphLabels;
23 
27 {
28 public:
31 
34 
41  SGVector<float64_t> loss_weights);
42 
44 
50  {
51  if ( base_data->get_structured_data_type() == SDT_FACTOR_GRAPH )
52  return (CFactorGraphObservation*) base_data;
53  else
54  SG_SERROR("base_data must be of dynamic type CFactorGraphObservation\n")
55 
56  return NULL;
57  }
58 
60  virtual const char* get_name() const { return "FactorGraphObservation"; }
61 
64 
67 
72  void set_loss_weights(SGVector<float64_t> loss_weights);
73 
74 protected:
77 
80 };
81 
82 
88 {
89  public:
92 
97  CFactorGraphLabels(int32_t num_labels);
98 
100  virtual ~CFactorGraphLabels();
101 
103  virtual const char* get_name() const { return "FactorGraphLabels"; }
104 
105  private:
107  void init();
108 
109 }; /* CFactorGraphLabels */
110 
111 } /* namespace shogun */
112 
113 #endif /* __FACTORGRAPH_LABELS_H__ */

SHOGUN Machine Learning Toolbox - Documentation