frbf {frbf}R Documentation

Flexible Radial Basis Function

Description

Models kernels in Radial Basis Function networks. The function provides flexibility to the kernel structure. This flexibility comes through the use of modifier functions applied to the distance computation procedure, essential for all kernel evaluations.

Usage

frbf(data_matrix, number_clusters, class_name, 
   weighting_function = "euclidean", 
   scale_variance = TRUE, 
   s_value = 0.2, 
   d = 0.23,
   epsilon = 0.01, 
   niter = -1, 
   niter_changes = 5, 
   perform_sum = TRUE, 
   clustering_algorithm = "",
   verbose="no")

Arguments

data_matrix the data to use to train the algorithm, must be a matrix or a data frame
number_clusters the total number of clusters, may be adjusted during the execution and will be used by the K-Means algorithm
class_name the name, or index, of the column that holds the class of the training data matrix
weighting_function the name of the kernel function from the options "euclidean", "one_minus", "one_minus_sq", "mahalanobis", "exp_one_minus", "exp_one_minus_sq", "exp_one_log", "normalized_difference", "normalized_difference_sq", if none is specified, the "euclidean" function will be used
scale_variance specifies if the scale should be performed for the principal components analysis, default is True (see prcomp)
s_value the initial value to use to find the s value, to use to find the kernels sigma value, the spread parameter adjustment, it has a default value of 0.2
d the initial d value to use to find the s value, it will use the default value of 0.23 if no value is specified
epsilon the epsilon for the functions that require it, if none is specified a default value of 0.01 will be used
niter the maximum number of iterations to perform to find s, if no value is provided, a default will be calculated based on the number of training data points
niter_changes the number of iteraction without changes that can occur, if this number is reached withou any change, the iteration will stop, if no value is specified 5 will be used by default
perform_sum specifies if the sum of the centroids per cluster should be applied, or not, default is True
clustering_algorithm specifies which of the K-Means algorithms should be used, if none is specified, the default K-Means algorithm will be used
verbose specifies the algorithm verbosity during the execution, from "no", "yes", "detail", "debug" options, if nothing is specified it will be "no"

Details

The epsilon will only used for the functions that require it.

The scale_variance is the prcomp scale parameter.

The verbosity set in the frbf will affect the predict function verbosity as well.

Value

Returns a RemoraModel S4 object with the following slots:

config the configuration used on the model
model the matrix with the model data information
lambda the function lambda calculated per each cluster
kernels the model kernels, the result from the kmeans

Note

Some user defined values may be overwriten by the function if they are considered unsuitable for the learning procedure. In such cases, warnings will be issued describing what has been changed.

Author(s)

Fernando Martins and Andre Falcao

References

Andre O. Falcao, Thibault Langlois and Andreas Wichert (2006) Flexible kernels for RBF networks. Jornal of Neurocomputing, volume 69, pp 2356-2359. Elsevier.

See Also

kmeans prcomp RemoraModel

Examples

# Example 
# data will be splitted into training and classification groups
data(iris) 
samp <- sample(1:150, 75)
# the training matrix will be use 75 random points
training_matrix <- iris[samp, ]
# the matrix to classify will use all the other points 
classification_matrix <- iris[-samp, ]

# create the model
model <- frbf(training_matrix, weighting_function="mahalanobis", class_name = "Species", number_clusters = 3, scale_variance = TRUE)

# the configuration used on the model 
print(model@config) 
# the matrix with the model data information 
print(model@model) 
# the function lambda calculated per each cluster 
print(model@lambda) 
# the model kernels, the result from the kmeans 
print(model@kernels) 

# predict 
classification <- predict(model, classification_matrix) 
# the classification points for the last 
print(classification)

[Package frbf version 1.0.1 Index]