Belle II Software development
|
Hopfield Algorithm with number based inputs. More...
#include <HopfieldNetwork.h>
Public Member Functions | |
HopfieldNetwork (float omega=0.5, float T=3.1, float Tmin=0.1, float cmax=0.01) | |
Constructor taking parameters for the algorithm. | |
unsigned short | doHopfield (std::vector< OverlapResolverNodeInfo > &overlapResolverNodeInfos, unsigned short nIterations=20) |
Performance of the actual algorithm. | |
Private Attributes | |
float | m_omega |
tuning parameter of the hopfield network | |
float | m_T |
start temperature of annealing | |
float | m_Tmin |
minimal temperature allowed | |
float | m_cmax |
maximal change of weights between iterations | |
Hopfield Algorithm with number based inputs.
This class encapsulates the actual algorithm with pure number inputs (instead of objects of TrackCandidates or whatever). The reason for this is mainly better testability and potentially as well reusability. The development of this class started as a copy from Jakob's implementation for the VXDTF2.
Relevant resources: [1] R. Frühwirth, "Selection of optimal subsets of tracks with a feedback neural network", Comput. Phys. Commun., vol. 78, pp. 23–28, 1993.
Definition at line 33 of file HopfieldNetwork.h.
|
inline |
Constructor taking parameters for the algorithm.
omega | Should be between 0 and 1; small values lead to large number of nodes, large ones to large sums of quality indicators. |
T | Temperature for annealing. |
Tmin | Minimal reached temperature in the annealing scheme. |
cmax | Maximum change of weights between iterations, so we accept the network as converged. |
Definition at line 42 of file HopfieldNetwork.h.
unsigned short doHopfield | ( | std::vector< OverlapResolverNodeInfo > & | overlapResolverNodeInfos, |
unsigned short | nIterations = 20 |
||
) |
Performance of the actual algorithm.
HINT FOR SPEED OPTIMIZATION: A lot of time is spend for checking the Logger, if you don't have LOG_NO_B2DEBUG defined. If you have done that, a lot of time is taken by the tanh function and drawing random numbers.
Currently this algorithm can only be used once for each instance, as the algorithm parameter variables are changed during the performance.
Definition at line 20 of file HopfieldNetwork.cc.
|
private |
maximal change of weights between iterations
Definition at line 63 of file HopfieldNetwork.h.
|
private |
tuning parameter of the hopfield network
Definition at line 60 of file HopfieldNetwork.h.
|
private |
start temperature of annealing
Definition at line 61 of file HopfieldNetwork.h.
|
private |
minimal temperature allowed
Definition at line 62 of file HopfieldNetwork.h.