114 Kernel(
unsigned int inputDim,
unsigned int outputDim);
144 void show(
unsigned int idx=0)
const;
155 void set(
const float *w_in,
const float *w_out,
const float *A);
159 static const int TRAIN_CENTERS = 1;
160 static const int TRAIN_SIGMAS = 2;
161 static const int TRAIN_OUTPUTS = 4;
162 static const int TRAIN_MATRICES = 8;
163 static const int TRAIN_ALL = TRAIN_CENTERS | TRAIN_SIGMAS | TRAIN_OUTPUTS | TRAIN_MATRICES;
166 void init_private(
unsigned int inputDim,
unsigned int outputDim);
171 LLM(
unsigned int inputDim,
unsigned int outputDim);
173 LLM(
unsigned int inputDim,
unsigned int outputDim,
unsigned int numCenters,
175 const std::vector<float> &var=std::vector<float>(1,1));
191 const std::vector<float> &var=std::vector<float>(1,1));
197 void init(
const std::vector<float*> ¢ers,
198 const std::vector<float> &var=std::vector<float>(1,1));
203 const float *apply(
const float *x);
208 void train(
const float *x,
const float *y,
int trainflags = TRAIN_ALL);
211 void trainCenters(
const float *x);
214 void trainSigmas(
const float *x);
217 void trainOutputs(
const float *x,
const float *y);
220 void trainMatrices(
const float *x,
const float *y);
226 const float *updateGs(
const float *x);
230 const float *getErrorVec(
const float *x,
const float *y);
240 void setEpsilonA(
float val) { setPropertyValue(
"epsilon A",val); }
247 void showKernels()
const;
263 bool isSoftMaxUsed()
const {
return const_cast<Configurable*>(static_cast<const Configurable*>(
this))->getPropertyValue(
"soft max enabled").as<
bool>(); }
271 void trainCentersIntern(
const float *x,
const float *g);
274 void trainSigmasIntern(
const float *x,
const float *g);
277 void trainOutputsIntern(
const float *x,
const float *y,
const float *g,
const float *dy,
bool useDeltaWin);
280 void trainMatricesIntern(
const float *x,
const float *y,
const float *g,
const float *dy);
283 const float *applyIntern(
const float *x,
const float *g);
286 const float *getErrorVecIntern(
const float *y,
const float *ynet);
305 float m_epsilonSigma;
307 std::vector<Kernel> m_kernels;
class representing a range defined by min and max value
Definition: Range.h:49
std::vector< float > m_outBuf
internal output value buffer
Definition: LLM.h:311
undocument this line if you encounter any issues!
Definition: Any.h:37
#define ICLMath_API
Definition: CompatMacros.h:173
const Kernel & operator[](unsigned int i) const
returns a specifice kernel at given index (const)
Definition: LLM.h:253
unsigned int numKernels() const
returns the current internal kernel count
Definition: LLM.h:250
float * w_in
input weight (prototype vector) of this kernel
Definition: LLM.h:123
unsigned int m_inputDim
input dimension
Definition: LLM.h:289
Kernel & operator[](unsigned int i)
returns a specifice kernel (unconst version)
Definition: LLM.h:260
unsigned int outputDim
output dimension
Definition: LLM.h:141
void setEpsilonIn(float val)
sets up learning rate for input weights to a new value (about 0..1)
Definition: LLM.h:234
void setEpsilonA(float val)
sets up learning rate for slope matrices to a new value (about 0..1)
Definition: LLM.h:240
float * A
matrix for the linear map
Definition: LLM.h:129
Internally used Kernel structure.
Definition: LLM.h:110
std::vector< float > m_gBuf
internal buffer for the g_i[x]
Definition: LLM.h:314
unsigned int inputDim
input dimension
Definition: LLM.h:138
void setEpsilonSigma(float val)
sets up learning rate for sigmas to a new value (about 0..1)
Definition: LLM.h:244
float * var
variance-vector of the Gaussian kernel (trace(Cxx))
Definition: LLM.h:135
float * dw_in
buffer for last input weight update
Definition: LLM.h:132
Interface for classes that can be configured from configuration-files and GUI-Components.
Definition: Configurable.h:194
bool isSoftMaxUsed() const
returns whether the softmax function for calculation for g_i[x] is used
Definition: LLM.h:263
void setSoftMaxEnabled(bool enabled)
sets whether the softmax function for calculation for g_i[x] is used
Definition: LLM.h:266
Local Linear Map implementation (LLM)
Definition: LLM.h:107
std::vector< float > m_errorBuf
internal buffer for the current error vector
Definition: LLM.h:317
ICLQt_API void show(const icl::core::ImgBase &image)
shows an image using TestImages::show
void setEpsilonOut(float val)
sets up learning rate for output weights to a new value (about 0..1)
Definition: LLM.h:237
float * w_out
output weight of this kernel
Definition: LLM.h:126
unsigned int m_outputDim
output dimension
Definition: LLM.h:292