Documentation of 'smile.classification.RBFNetwork' Java class
RBFNetwork
smile.classification

Class RBFNetwork<T>

  • All Implemented Interfaces:
    java.io.Serializable, Classifier<T>


    public class RBFNetwork<T>
    extends java.lang.Object
    implements Classifier<T>, java.io.Serializable
    Radial basis function networks. A radial basis function network is an artificial neural network that uses radial basis functions as activation functions. It is a linear combination of radial basis functions. They are used in function approximation, time series prediction, and control.

    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).

    The popular choices for φ comprise the Gaussian function and the so called thin plate splines. The advantage of the thin plate splines is that their conditioning is invariant under scalings. Gaussian, multi-quadric and inverse multi-quadric are infinitely smooth and and involve a scale or shape parameter, r0 > 0. Decreasing r0 tends to flatten the basis function. For a given function, the quality of approximation may strongly depend on this parameter. In particular, increasing r0 has the effect of better conditioning (the separation distance of the scaled points increases).

    A variant on RBF networks is normalized radial basis function (NRBF) networks, in which we require the sum of the basis functions to be unity. NRBF arises more naturally from a Bayesian statistical perspective. However, there is no evidence that either the NRBF method is consistently superior to the RBF method, or vice versa.

    SVMs with Gaussian kernel have similar structure as RBF networks with Gaussian radial basis functions. However, the SVM approach "automatically" solves the network complexity problem since the size of the hidden layer is obtained as the result of the QP procedure. Hidden neurons and support vectors correspond to each other, so the center problems of the RBF network is also solved, as the support vectors serve as the basis function centers. It was reported that with similar number of support vectors/centers, SVM shows better generalization performance than RBF network when the training data size is relatively small. On the other hand, RBF network gives better generalization performance than SVM on large training data.

    References

    1. Simon Haykin. Neural Networks: A Comprehensive Foundation (2nd edition). 1999.
    2. T. Poggio and F. Girosi. Networks for approximation and learning. Proc. IEEE 78(9):1484-1487, 1990.
    3. Nabil Benoudjit and Michel Verleysen. On the kernel widths in radial-basis function networks. Neural Process, 2003.
    See Also:
    RadialBasisFunction, SVM, NeuralNetwork, Serialized Form
    • Constructor Detail

      • RBFNetwork

        public RBFNetwork(T[] x,
                          int[] y,
                          Metric<T> distance,
                          RadialBasisFunction rbf,
                          T[] centers)
        Constructor. Learn a regular RBF network without normalization.
        Parameters:
        x - training samples.
        y - training labels in [0, k), where k is the number of classes.
        distance - the distance metric functor.
        rbf - the radial basis function.
        centers - the centers of RBF functions.
      • RBFNetwork

        public RBFNetwork(T[] x,
                          int[] y,
                          Metric<T> distance,
                          RadialBasisFunction[] rbf,
                          T[] centers)
        Constructor. Learn a regular RBF network without normalization.
        Parameters:
        x - training samples.
        y - training labels in [0, k), where k is the number of classes.
        distance - the distance metric functor.
        rbf - the radial basis function.
        centers - the centers of RBF functions.
      • RBFNetwork

        public RBFNetwork(T[] x,
                          int[] y,
                          Metric<T> distance,
                          RadialBasisFunction rbf,
                          T[] centers,
                          boolean normalized)
        Constructor. Learn a RBF network.
        Parameters:
        x - training samples.
        y - training labels in [0, k), where k is the number of classes.
        distance - the distance metric functor.
        rbf - the radial basis functions.
        centers - the centers of RBF functions.
        normalized - true for the normalized RBF network.
      • RBFNetwork

        public RBFNetwork(T[] x,
                          int[] y,
                          Metric<T> distance,
                          RadialBasisFunction[] rbf,
                          T[] centers,
                          boolean normalized)
        Constructor. Learn a RBF network.
        Parameters:
        x - training samples.
        y - training labels in [0, k), where k is the number of classes.
        distance - the distance metric functor.
        rbf - the radial basis functions.
        centers - the centers of RBF functions.
        normalized - true for the normalized RBF network.
    • Method Detail

      • predict

        public int predict(T x)
        Description copied from interface: Classifier
        Predicts the class label of an instance.
        Specified by:
        predict in interface Classifier<T>
        Parameters:
        x - the instance to be classified.
        Returns:
        the predicted class label.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.