RBFinit: Initialization of parameters for a Radial Basis Function...

View source: R/RBFinit.R

RBFinitR Documentation

Initialization of parameters for a Radial Basis Function classifier

Description

RBFinit returns initial parameter values for a Radial Basis Function classifier.

Usage

RBFinit(x, y, nproto)

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

nproto

Number of prototypes

Details

The prototypes are initialized by the k-means algorithms. The hidden-to-output weights are initialized by linear regression. The scale parameter for each prototype is computed as the inverse of the square root of the mean squared distances to this prototype. The final number of prototypes may be different from the desired number nproto depending on the result of the k-means clustering (clusters composed of only one input vector are discarded).

Value

A list with three elements containing the initialized network parameters

P

Matrix of size (R,d), containing the R prototype coordinates.

Gamma

Vector of length R, containing the scale parameters.

W

Matrix of size (R,M), containing the hidden-to-output weights.

Author(s)

Thierry Denoeux.

See Also

RBFfit, RBFval

Examples

## Glass dataset
data(glass)
xapp<-glass$x[1:89,]
yapp<-glass$y[1:89]
param0<-RBFinit(xapp,yapp,nproto=7)
param0

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