public class RBF<T>
extends java.lang.Object
implements java.io.Serializable
In its basic form, radial basis function network is in the form
y(x) = Σ wi φ(||x-ci||)
where the approximating function y(x) is represented as
a sum of N radial basis functions φ, each associated
with a different center ci, and weighted by an
appropriate coefficient wi. For distance,
one usually chooses Euclidean distance. The weights
wi can be estimated using the matrix methods of
linear least squares, because the approximating function is linear
in the weights.
The centers ci can be randomly selected
from training data, or learned by some clustering method (e.g. k-means),
or learned together with weight parameters undergo a supervised
learning processing (e.g. error-correction learning).
| Constructor and Description |
|---|
RBF(T center,
smile.math.rbf.RadialBasisFunction rbf,
smile.math.distance.Metric<T> distance)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
f(T x)
The activation function.
|
static RBF<double[]>[] |
fit(double[][] x,
int k)
Learns Gaussian RBF function and centers from data.
|
static RBF<double[]>[] |
fit(double[][] x,
int k,
double r)
Learns Gaussian RBF function and centers from data.
|
static RBF<double[]>[] |
fit(double[][] x,
int k,
int p)
Learns Gaussian RBF function and centers from data.
|
static <T> RBF<T>[] |
fit(T[] x,
smile.math.distance.Metric<T> distance,
int k)
Learns Gaussian RBF function and centers from data.
|
static <T> RBF<T>[] |
fit(T[] x,
smile.math.distance.Metric<T> distance,
int k,
double r)
Learns Gaussian RBF function and centers from data.
|
static <T> RBF<T>[] |
fit(T[] x,
smile.math.distance.Metric<T> distance,
int k,
int p)
Learns Gaussian RBF function and centers from data.
|
static <T> RBF<T>[] |
of(T[] centers,
smile.math.rbf.RadialBasisFunction[] basis,
smile.math.distance.Metric<T> distance)
Makes a set of RBF neurons.
|
static <T> RBF<T>[] |
of(T[] centers,
smile.math.rbf.RadialBasisFunction basis,
smile.math.distance.Metric<T> distance)
Makes a set of RBF neurons.
|
public double f(T x)
public static <T> RBF<T>[] of(T[] centers, smile.math.rbf.RadialBasisFunction basis, smile.math.distance.Metric<T> distance)
public static <T> RBF<T>[] of(T[] centers, smile.math.rbf.RadialBasisFunction[] basis, smile.math.distance.Metric<T> distance)
public static RBF<double[]>[] fit(double[][] x, int k)
x - the training dataset.k - the number of RBF neurons to learn.public static RBF<double[]>[] fit(double[][] x, int k, int p)
x - the training dataset.k - the number of RBF neurons to learn.p - the number of nearest neighbors of centers to estimate the width
of Gaussian RBF functions.public static RBF<double[]>[] fit(double[][] x, int k, double r)
x - the training dataset.k - the number of RBF neurons to learn.r - the scaling parameter.public static <T> RBF<T>[] fit(T[] x, smile.math.distance.Metric<T> distance, int k)
x - the training dataset.k - the number of RBF neurons to learn.distance - the distance functor.public static <T> RBF<T>[] fit(T[] x, smile.math.distance.Metric<T> distance, int k, int p)
x - the training dataset.k - the number of RBF neurons to learn.distance - the distance functor.p - the number of nearest neighbors of centers to estimate the width
of Gaussian RBF functions.public static <T> RBF<T>[] fit(T[] x, smile.math.distance.Metric<T> distance, int k, double r)
x - the training dataset.k - the number of RBF neurons to learn.distance - the distance functor.r - the scaling parameter.