Machine Learning Library
|
#include <CKernelCache.h>
Public Member Functions | |
CKernelCache (CKernel< Type > *pptKernel, vector< CSVCandidate< Type > > *ptDataset, Type tDTPos=0, Type tDTNeg=0, Type tMaxMegaByte=10) | |
~CKernelCache () | |
const CDenseVector< Type > * | requestRow (int i1, vector< int > *ptActiveCols=NULL) |
void | init () |
void | clear () |
void | calculateRow (CDenseVector< Type > *ptRow, int iIndex) |
void | setKernel (CKernel< Type > *ptKernel) |
void | reorganize (int iSubsetSize=-1) |
float | fillState () |
float | freeSpace () |
void | setCacheSize (Type tSize) |
virtual string | className () const |
Returns the class name. More... | |
virtual bool | isA (const char *acClass) const |
Check if the object is an instance of the class with given name. More... | |
void | setDiagonalTerm (Type tDT) |
void | setDiagonalTerm (Type tDTPos, Type tDTNeg) |
![]() | |
CObject () | |
Constructor. More... | |
virtual | ~CObject () |
Destructor. More... | |
virtual bool | serialize (fstream &stream, IO_MODE mode=READ) |
Read/write from binary stream. More... | |
virtual bool | serialize2 (CArchiv &tArchiv) |
void | setVerbose (VERBOSE_LEVEL tVerbose) |
Set the verbose level. More... | |
VERBOSE_LEVEL | verbose (void) const |
Return current verbose level. More... | |
DATATYPE | dataType () const |
Returns the template data type. More... | |
Static Public Member Functions | |
static void | threadFunction (void *pvData) |
Public Attributes | |
vector< CSVCandidate< Type > > * | ptDataset |
CKernel< Type > * | ptKernel |
Protected Attributes | |
TCachedItem ** | pptCachedItems |
TCachedItem * | ptStorageHead |
TCachedItem * | ptStorageEnd |
Type | tCacheSize |
int | iMaxRows |
int | iNumCachedRows |
int | iNumItemsToUse |
Type | tDTPos |
Type | tDTNeg |
bool | bFastGaussian |
![]() | |
unsigned char | ucVerbose |
CKernelCache< Type >::CKernelCache | ( | CKernel< Type > * | pptKernel, |
vector< CSVCandidate< Type > > * | ptDataset, | ||
Type | tDTPos = 0 , |
||
Type | tDTNeg = 0 , |
||
Type | tMaxMegaByte = 10 |
||
) |
CKernelCache< Type >::~CKernelCache | ( | ) |
void CKernelCache< Type >::calculateRow | ( | CDenseVector< Type > * | ptRow, |
int | iIndex | ||
) |
|
inlinevirtual |
Returns the class name.
Reimplemented from CObject< Type >.
Referenced by CKernelCache< Type >::isA().
void CKernelCache< Type >::clear | ( | ) |
float CKernelCache< Type >::fillState | ( | ) |
Returns percentage of cached rows
float CKernelCache< Type >::freeSpace | ( | ) |
Return left cache meory in MB
void CKernelCache< Type >::init | ( | ) |
|
inlinevirtual |
Check if the object is an instance of the class with given name.
Reimplemented from CObject< Type >.
References CKernelCache< Type >::className(), and CObject< Type >::isA().
void CKernelCache< Type >::reorganize | ( | int | iSubsetSize = -1 | ) |
Clear current cache. If iSubsetSize is unequal to -1 only the first iSubsetSize elements of the dataset will be cached. In this case, a iSubsetSize X iSubsetSize matrix will similated.
Size | of subset to cache. Whole dataset if equal to -1 |
const CDenseVector<Type>* CKernelCache< Type >::requestRow | ( | int | i1, |
vector< int > * | ptActiveCols = NULL |
||
) |
|
inline |
void CKernelCache< Type >::setDiagonalTerm | ( | Type | tDT | ) |
void CKernelCache< Type >::setDiagonalTerm | ( | Type | tDTPos, |
Type | tDTNeg | ||
) |
void CKernelCache< Type >::setKernel | ( | CKernel< Type > * | ptKernel | ) |
Update pointer to kernel function object.
ptKernel | New pointer |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
vector< CSVCandidate<Type> >* CKernelCache< Type >::ptDataset |
CKernel<Type>* CKernelCache< Type >::ptKernel |
|
protected |
|
protected |
|
protected |
Referenced by CKernelCache< Type >::setCacheSize().
|
protected |
|
protected |