SHOGUN  6.1.3
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
ObservedValue Class Reference

Detailed Description

Observed value which is emitted by algorithms.

Definition at line 63 of file ObservedValue.h.

Public Member Functions

 ObservedValue (int64_t step, std::string &name, Any value, SG_OBS_VALUE_TYPE type)
 
 ~ObservedValue ()
 
int64_t get_step () const
 
void set_step (int64_t step)
 
const std::string & get_name () const
 
void set_name (const std::string &name)
 
const Anyget_value () const
 
void set_value (const Any &value)
 
SG_OBS_VALUE_TYPE get_type () const
 
void set_type (const SG_OBS_VALUE_TYPE type)
 

Static Public Member Functions

static ObservedValue make_observation (int64_t step, std::string &name, Any value)
 

Protected Attributes

int64_t m_step
 
std::string m_name
 
Any m_value
 
SG_OBS_VALUE_TYPE m_type
 

Constructor & Destructor Documentation

◆ ObservedValue()

ObservedValue ( int64_t  step,
std::string &  name,
Any  value,
SG_OBS_VALUE_TYPE  type 
)

Constructor

Parameters
stepstep
nameparam's name
valueAny-wrapped value of the param

Definition at line 72 of file ObservedValue.h.

◆ ~ObservedValue()

Definition at line 78 of file ObservedValue.h.

Member Function Documentation

◆ get_name()

const std::string& get_name ( ) const

Get the param's name

Returns
param's name

Definition at line 102 of file ObservedValue.h.

◆ get_step()

int64_t get_step ( ) const

Get the step

Returns
an integer representing the step

Definition at line 84 of file ObservedValue.h.

◆ get_type()

SG_OBS_VALUE_TYPE get_type ( ) const

Get the type of this ObservedValue

Returns
observed value type

Definition at line 138 of file ObservedValue.h.

◆ get_value()

const Any& get_value ( ) const

Get the Any-wrapped value

Returns
Any-wrapped value

Definition at line 120 of file ObservedValue.h.

◆ make_observation()

static ObservedValue make_observation ( int64_t  step,
std::string &  name,
Any  value 
)
static

Helper method to generate an ObservedValue (TensorBoard oriented)

Parameters
stepthe step
namethe param's name we are observing
valuethe param's value
Returns
an ObservedValue object initialized

Definition at line 160 of file ObservedValue.h.

◆ set_name()

void set_name ( const std::string &  name)

Set the param's name

Parameters
name

Definition at line 111 of file ObservedValue.h.

◆ set_step()

void set_step ( int64_t  step)

Set the step

Parameters
stepstep

Definition at line 93 of file ObservedValue.h.

◆ set_type()

void set_type ( const SG_OBS_VALUE_TYPE  type)

Set the observed value type

Parameters
typetype of this observed value

Definition at line 147 of file ObservedValue.h.

◆ set_value()

void set_value ( const Any value)

Set the param's value

Parameters
value

Definition at line 129 of file ObservedValue.h.

Member Data Documentation

◆ m_name

std::string m_name
protected

Parameter's name

Definition at line 169 of file ObservedValue.h.

◆ m_step

int64_t m_step
protected

ObservedValue step (used by Tensorboard to print graphs)

Definition at line 167 of file ObservedValue.h.

◆ m_type

SG_OBS_VALUE_TYPE m_type
protected

ObservedValue type

Definition at line 173 of file ObservedValue.h.

◆ m_value

Any m_value
protected

Parameter's value

Definition at line 171 of file ObservedValue.h.


The documentation for this class was generated from the following file:

SHOGUN Machine Learning Toolbox - Documentation