RBFfit | R Documentation |
RBFfit
performs parameter optimization for a radial basis function (RBF) classifier.
RBFfit(
x,
y,
param,
lambda = 0,
control = list(fnscale = -1, trace = 2, maxit = 1000),
optimProto = TRUE
)
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 |
lambda |
Regularization hyperparameter (default=0). |
control |
Parameters passed to function |
optimProto |
Boolean. If TRUE, the prototypes are optimized (default). Otherwise, they are fixed. |
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
.
A list with three elements:
Optimized network parameters.
Final value of the log-likelihood objective function.
Training error rate.
Thierry Denoeux.
proDSinit
, proDSval
## 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.