Learn R Programming

evclass (version 2.0.2)

RBFfit: Training of a radial basis function classifier

Description

RBFfit performs parameter optimization for a radial basis function (RBF) classifier.

Usage

RBFfit(
  x,
  y,
  param,
  lambda = 0,
  control = list(fnscale = -1, trace = 2, maxit = 1000),
  optimProto = TRUE
)

Value

A list with three elements:

param

Optimized network parameters.

loglik

Final value of the log-likelihood objective function.

err

Training error rate.

Arguments

x

Input matrix of size n x d, where n is the number of objects and d the number of attributes.

y

Vector of class labels (of length n). May be a factor, or a vector of integers from 1 to M (number of classes).

param

Initial parameters (see RBFinit).

lambda

Regularization hyperparameter (default=0).

control

Parameters passed to function optim.

optimProto

Boolean. If TRUE, the prototypes are optimized (default). Otherwise, they are fixed.

Author

Thierry Denoeux.

Details

The RBF neural network is trained by maximizing the conditional log-likelihood (or, equivalently, by minimizing the cross-entropy loss function). The optimization procedure is the BFGS algorithm implemented in function optim.

See Also

proDSinit, proDSval

Examples

Run this code
## Glass dataset
data(glass)
xapp<-glass$x[1:89,]
yapp<-glass$y[1:89]
## Initialization
param0<-RBFinit(xapp,yapp,nproto=7)
## Training
fit<-RBFfit(xapp,yapp,param0,control=list(fnscale=-1,trace=2))

Run the code above in your browser using DataLab