public class FixIndexKernelCache extends KernelCache implements Serializable
Constructor and Description |
---|
FixIndexKernelCache() |
FixIndexKernelCache(int examplesToStore)
Initializes a FixIndexKernelCache that can contain all the possible pairwise kernel computations
between up to
examplesToStore examples |
Modifier and Type | Method and Description |
---|---|
void |
flushCache()
Empties the cache
|
int |
getExamplesToStore()
Returns the maximum number of examples whose pairwise kernel computations
can be simultaneously stored
|
protected Float |
getStoredKernelValue(Example exA,
Example exB)
Retrieves in the cache the kernel operation between two examples
|
void |
setExamplesToStore(int examplesToStore)
Sets the maximum number of examples whose pairwise kernel computations
can be simultaneously stored
|
void |
setKernelValue(Example exA,
Example exB,
float value)
Stores a kernel computation in cache
|
getCacheHits, getCacheMisses, getKernelValue, resetCacheStats
public FixIndexKernelCache(int examplesToStore)
examplesToStore
examplesexamplesToStore
- the maximum number of examples whose pairwise kernel computations
can be simultaneously storedpublic FixIndexKernelCache()
public int getExamplesToStore()
public void setExamplesToStore(int examplesToStore)
examplesToStore
- the examplesToStore to set
NOTE: all the already stored kernel computations will be lost
protected Float getStoredKernelValue(Example exA, Example exB)
KernelCache
getStoredKernelValue
in class KernelCache
exA
- the first exampleexB
- the second examplenull<\code> if a cache miss occurs
public void setKernelValue(Example exA, Example exB, float value)
KernelCache
setKernelValue
in class KernelCache
exA
- the first exampleexB
- the second examplevalue
- the kernel value to be stored in cachepublic void flushCache()
KernelCache
flushCache
in class KernelCache
Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.