RBFval: Classification of a test set by a radial basis function...

View source: R/RBFval.R

RBFvalR Documentation

Classification of a test set by a radial basis function classifier

Description

RBFval classifies instances in a test set using a radial basis function classifier. Function calcm is called for computing output belief functions. It is recommended to set calc.belief=FALSE when the number of classes is very large, to avoid memory problems.

Usage

RBFval(x, param, y = NULL, calc.belief = TRUE)

Arguments

x

Matrix of size n x d, containing the values of the d attributes for the test data.

param

Neural network parameters, as provided by RBFfit.

y

Optional vector of class labels for the test data. May be a factor, or a vector of integers from 1 to M (number of classes).

calc.belief

If TRUE (default), output belief functions are calculated.

Details

If class labels for the test set are provided, the test error rate is also returned.

Value

A list with four elements:

ypred

Predicted class labels for the test data.

err

Test error rate (if the class label of test data has been provided).

Prob

Output probabilities.

Belief

If calc.belief=TRUE, output belief function, provided as a list output by function calcm.

Author(s)

Thierry Denoeux.

References

T. Denoeux. Logistic Regression, Neural Networks and Dempster-Shafer Theory: a New Perspective. Knowledge-Based Systems, Vol. 176, Pages 54–67, 2019.

Ling Huang, Su Ruan, Pierre Decazes and Thierry Denoeux. Lymphoma segmentation from 3D PET-CT images using a deep evidential network. International Journal of Approximate Reasoning, Vol. 149, Pages 39-60, 2022.

See Also

RBFinit, RBFfit, calcm

Examples

## Glass dataset
data(glass)
xapp<-glass$x[1:89,]
yapp<-glass$y[1:89]
xtst<-glass$x[90:185,]
ytst<-glass$y[90:185]
## Initialization
param0<-RBFinit(xapp,yapp,nproto=7)
## Training
fit<-RBFfit(xapp,yapp,param0)
## Test
val<-RBFval(xtst,fit$param,ytst)
## Confusion matrix
table(ytst,val$ypred)

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