RBFfit: Training of a radial basis function classifier

View source: R/RBFfit.R

RBFfitR Documentation

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
)

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.

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.

Value

A list with three elements:

param

Optimized network parameters.

loglik

Final value of the log-likelihood objective function.

err

Training error rate.

Author(s)

Thierry Denoeux.

See Also

proDSinit, proDSval

Examples

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

evclass documentation built on Nov. 9, 2023, 5:08 p.m.