vq3
|
#include <vq3Epoch.hpp>
Public Types | |
using | sample_type = SAMPLE_TYPE |
using | vertex_value_type = VERTEX_VALUE_TYPE |
using | prototype_type = PROTOTYPE_TYPE |
Public Member Functions | |
void | notify_closest (const prototype_type &prototype, const sample_type &sample, double closest_distance) |
void | notify_wtm_update (const sample_type &sample, double topo_coef) |
void | notify_wta_update (const sample_type &sample) |
void | set_prototype (prototype_type &prototype) |
void | set_content (vertex_value_type &vertex_value) |
EpochData & | operator+= (const EpochData &other) |
This stores data collected about a vertex (handling a prototype) during an epoch.
void vq3::spec::EpochData< SAMPLE_TYPE, VERTEX_VALUE_TYPE, PROTOTYPE_TYPE >::notify_closest | ( | const prototype_type & | prototype, |
const sample_type & | sample, | ||
double | closest_distance | ||
) |
This notifies that the prototype handled by the vertex is the closest.
prototype | The prototype value. |
sample | The current sample that is submitted. |
closest_distance | The distance from the vertex prototype and the sample (which is the cmallest among all vertices in the graph). |
void vq3::spec::EpochData< SAMPLE_TYPE, VERTEX_VALUE_TYPE, PROTOTYPE_TYPE >::notify_wta_update | ( | const sample_type & | sample | ) |
This notifies that the prototype should be updated. No coefficient is provides, this is used in a WTA context.
sample | The current sample that is submitted. |
void vq3::spec::EpochData< SAMPLE_TYPE, VERTEX_VALUE_TYPE, PROTOTYPE_TYPE >::notify_wtm_update | ( | const sample_type & | sample, |
double | topo_coef | ||
) |
This notifies that the prototype should be updated.
sample | The current sample that is submitted. |
topo_coef | This is the WTM coefficient related to edge-distance between the BMU and the prototype. |
EpochData& vq3::spec::EpochData< SAMPLE_TYPE, VERTEX_VALUE_TYPE, PROTOTYPE_TYPE >::operator+= | ( | const EpochData< SAMPLE_TYPE, VERTEX_VALUE_TYPE, PROTOTYPE_TYPE > & | other | ) |
This combine the current data with another one (computed in another thread) for the same vertex.
void vq3::spec::EpochData< SAMPLE_TYPE, VERTEX_VALUE_TYPE, PROTOTYPE_TYPE >::set_content | ( | vertex_value_type & | vertex_value | ) |
This is prototype value updating, at the end of an epoch (i.e. not in the parallel execution). @vertex_value This is the vertex value of the vertex, passed by reference in order do be modified by the call.
void vq3::spec::EpochData< SAMPLE_TYPE, VERTEX_VALUE_TYPE, PROTOTYPE_TYPE >::set_prototype | ( | prototype_type & | prototype | ) |
This is learning, at the end of an epoch. @prototype This is the prototype of the vertex, passed by reference in order do be modified by the call.