RBFNN_train: Train a Radial Basis Function Neural Network.

Description Usage Arguments Value Examples

View source: R/RBFNN.R

Description

Train a Radial Basis Function Neural Network.

Usage

1
RBFNN_train(X, Y, neurons, it, inputType = "original_dataset")

Arguments

X

original dataset, distance matrix or gaussian kernel matrix.

Y

the labels of X. Each observation has one label.

neurons

number of neurons in the hidden layer.

it

value used in the seed.

inputType

type of X. Available types: original_dataset (original dataset), distance_matrix (Euclidean distance matrix ) and kernel_matrix (Gaussian kernel matrix).

Value

The trained model, the centroids of the RBFNN, the standard deviations of each RBF neuron and indexes of the observations that are the centroids.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(iris)
dataset <- iris[, 1:4]
labels <- iris[, 5]

X_train <- dataset[1:100, ]
y_train <- labels[1:100]
X_test <- dataset[101:150, ]
y_test <- labels[101:150]

neurons <- 10
seed_val <- 1
RBFNN <- RBFNN_train(as.matrix(X_train), as.matrix(y_train), neurons, seed_val)

xmartin46/RBFNN documentation built on Jan. 1, 2021, 1:43 p.m.