SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FactorGraphLabels.cpp
Go to the documentation of this file.
2 
3 using namespace shogun;
4 
6  SGVector<float64_t> loss_weights)
7  : CStructuredData(), m_observed_state(observed_state)
8 {
9  if (loss_weights.size() == 0)
10  {
11  loss_weights.resize_vector(observed_state.size());
12  SGVector<float64_t>::fill_vector(loss_weights.vector, loss_weights.vlen, 1.0 / observed_state.size());
13  }
14 
15  set_loss_weights(loss_weights);
16 }
17 
19 {
20  return m_observed_state;
21 }
22 
24 {
25  return m_loss_weights;
26 }
27 
29 {
30  REQUIRE(loss_weights.size() == m_observed_state.size(), "%s::set_loss_weights(): \
31  loss_weights should be the same length as observed_states", get_name());
32 
33  m_loss_weights = loss_weights;
34 }
35 
36 //-------------------------------------------------------------------
37 
40 {
41 }
42 
44 : CStructuredLabels(num_labels)
45 {
46  init();
47 }
48 
50 {
51 }
52 
53 void CFactorGraphLabels::init()
54 {
55 }

SHOGUN Machine Learning Toolbox - Documentation