public class RFF_RBF extends DataTransformBase
RBFKernel
. It
transforms the numerical variables of a feature space to form a new feature
space where the dot product between features approximates the RBF Kernel
product.
Modifier | Constructor and Description |
---|---|
|
RFF_RBF()
Creates a new RFF RBF object that will use an transformed feature space
with a dimensionality of 512.
|
|
RFF_RBF(double sigma)
Creates a new RFF RBF object that will use an transformed feature space
with a dimensionality of 512.
|
|
RFF_RBF(double sigma,
int dim)
Creates a new RFF RBF object
|
|
RFF_RBF(double sigma,
int dim,
boolean inMemory)
Creates a new RFF RBF object
|
|
RFF_RBF(int featurSize,
double sigma,
int dim,
Random rand,
boolean inMemory)
Creates a new RFF RBF object
|
protected |
RFF_RBF(RFF_RBF toCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
RFF_RBF |
clone() |
void |
fit(DataSet data)
Fits this transform to the given dataset.
|
int |
getDimensions()
Returns the number of dimensions that will be used in the projected space
|
double |
getSigma()
Returns the σ value used for the RBF kernel approximation.
|
Distribution |
guessSigma(DataSet d)
Guess the distribution to use for the kernel width term
σ in the RBF kernel being approximated. |
boolean |
isInMemory() |
void |
setDimensions(int dimensions)
Sets the number of dimensions in the new approximate space to use.
|
void |
setInMemory(boolean inMemory)
Sets whether or not the transform matrix is stored explicitly in memory
or not.
|
void |
setSigma(double sigma)
Sets the σ parameter of the RBF kernel that is being approximated.
|
DataPoint |
transform(DataPoint dp)
Returns a new data point that is a transformation of the original data
point.
|
getParameter, getParameters
public RFF_RBF()
sigma
public RFF_RBF(double sigma)
sigma
- the positive sigma value for the RBFKernel
public RFF_RBF(double sigma, int dim)
sigma
- the positive sigma value for the RBFKernel
dim
- the new feature size dimension to project into.public RFF_RBF(double sigma, int dim, boolean inMemory)
sigma
- the positive sigma value for the RBFKernel
dim
- the new feature size dimension to project into.inMemory
- true
if the internal matrix should be stored in
memory. If false
, the memory will be re-computed as needed,
increasing computation cost but uses no extra memory.public RFF_RBF(int featurSize, double sigma, int dim, Random rand, boolean inMemory)
featurSize
- the number of numeric features in the original feature
spacesigma
- the positive sigma value for the RBFKernel
dim
- the new feature size dimension to project into.rand
- the source of randomness to initialize internal stateinMemory
- true
if the internal matrix should be stored in
memory. If false
, the memory will be re-computed as needed,
increasing computation cost but uses no extra memory.protected RFF_RBF(RFF_RBF toCopy)
toCopy
- the object to copypublic void fit(DataSet data)
DataTransform
FailedToFitException
exception may be
thrown.data
- the dataset to fir this transform topublic DataPoint transform(DataPoint dp)
DataTransform
dp
- the data point to apply a transformation topublic RFF_RBF clone()
clone
in interface DataTransform
clone
in class DataTransformBase
public void setInMemory(boolean inMemory)
inMemory
- true
to explicitly store the transform matrix,
false
to re-create it on the fly as neededpublic boolean isInMemory()
true
if this object will explicitly store the transform
matrix, false
to re-create it on the fly as neededpublic void setDimensions(int dimensions)
dimensions
- public int getDimensions()
public void setSigma(double sigma)
sigma
- the positive value to use for σRBFKernel.setSigma(double)
public double getSigma()
public Distribution guessSigma(DataSet d)
σ
in the RBF kernel being approximated.d
- the data set to get the guess forCopyright © 2017. All rights reserved.