function [dp] = dict_init( kfunc, kparam, thresh, state ) % function [dp] = dict_init( kfunc, kparam, thresh, state ) % % Part of my kernel dictionary implementation. The idea is that we % will only admit points into the dictionary whose features aren't % representable as a linear combination of the other points in the % dictionary. % % INPUT: % kfunc - handle to the kernel function. This function should % take three arguments: X, Y, and some sort of parameter % (which is kernel specific). It should return a matrix K, % where K_ij is kernel(X_i,Y_j,kparam). X and Y are matrices, % where data points are stored as columns. % kparam - this will passed to the kernel function on every call. % thresh - the almost-linearly-independent threshold % state - the initial data point (a column vector) % % OUTPUT: % dp - a dictionary data structure, used for subsequent calls to 'dict' % % D. Wingate 10/25/2006 % dp.kfunc = kfunc; dp.kparam = kparam; dp.thresh = thresh; dp.Dict = state; dp.K = feval( kfunc, state, state, kparam ); dp.Kinv = 1 / dp.K; dp.addedFlag = 1; return;