Jaakkola's heuristic and related quantities for Gaussian kernel selection. More...
#include <shark/Algorithms/JaakkolaHeuristic.h>
Public Member Functions | |
template<class InputType > | |
JaakkolaHeuristic (LabeledData< InputType, unsigned int > const &dataset, bool nearestFalseNeighbor=true) | |
double | sigma (double quantile=0.5) |
double | gamma (double quantile=0.5) |
Jaakkola's heuristic and related quantities for Gaussian kernel selection.
\[ \gamma = \frac{1}{2 \sigma^2} \]
based on the median or on any other quantile of the empirical distribution.By default, only the distance to the closest point with different label is considered. This behavior can be turned off by an option of the constructor. This is faster andin accordance with the original paper.
Definition at line 65 of file JaakkolaHeuristic.h.
|
inline |
Constructor
dataset | vector-valued input data |
nearestFalseNeighbor | if true, only the nearest neighboring point with different label is considered (default true) |
Definition at line 72 of file JaakkolaHeuristic.h.
References shark::LabeledData< InputT, LabelT >::elements().
|
inline |
Compute the given quantile (usually the median) of the empirical distribution of Euclidean distances of data pairs with different labels converted into a value usable as the gamma parameter of the GaussianRbfKernel.
Definition at line 186 of file JaakkolaHeuristic.h.
References sigma().
Referenced by main().
|
inline |
Compute the given quantile (usually median) of the empirical distribution of Euclidean distances of data pairs with different labels.
Definition at line 155 of file JaakkolaHeuristic.h.
References SHARK_ASSERT.
Referenced by gamma().