SHOGUN  3.2.1
 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 
14 #include <shogun/lib/config.h>
15 
17 #include <shogun/lib/SGVector.h>
20 
21 namespace shogun
22 {
23 
24 class CFactorGraphLabels;
25 
29 {
30 public:
33 
36 
43  SGVector<float64_t> loss_weights);
44 
46 
52  {
53  if ( base_data->get_structured_data_type() == SDT_FACTOR_GRAPH )
54  return (CFactorGraphObservation*) base_data;
55  else
56  SG_SERROR("base_data must be of dynamic type CFactorGraphObservation\n")
57 
58  return NULL;
59  }
60 
62  virtual const char* get_name() const { return "FactorGraphObservation"; }
63 
66 
69 
74  void set_loss_weights(SGVector<float64_t> loss_weights);
75 
76 protected:
79 
82 };
83 
84 
90 {
91  public:
94 
99  CFactorGraphLabels(int32_t num_labels);
100 
102  virtual ~CFactorGraphLabels();
103 
105  virtual const char* get_name() const { return "FactorGraphLabels"; }
106 
107  private:
109  void init();
110 
111 }; /* CFactorGraphLabels */
112 
113 } /* namespace shogun */
114 
115 #endif /* __FACTORGRAPH_LABELS_H__ */

SHOGUN Machine Learning Toolbox - Documentation