Abstract class used as a template to ensure the proper definition of new customized clustering strategies.
new()
A function responsible for creating a GenericClusteringStrategy object.
GenericClusteringStrategy$new(subset, heuristic, description, configuration)
subset
A Subset
object to perform the clustering strategy.
heuristic
The heuristic to be applied. Must inherit from
GenericHeuristic
class.
description
A character vector describing the strategy operation.
configuration
Optional customized configuration parameters for the
strategy. Must inherited from StrategyConfiguration
abstract class.
getDescription()
The function is used to obtain the description of the strategy.
GenericClusteringStrategy$getDescription()
getHeuristic()
The function returns the heuristic applied for the clustering strategy.
GenericClusteringStrategy$getHeuristic()
An object inherited from GenericClusteringStrategy
class.
getConfiguration()
The function returns the configuration parameters used to perform the clustering strategy.
GenericClusteringStrategy$getConfiguration()
An object inherited from StrategyConfiguration
class.
getBestClusterDistribution()
The function obtains the best clustering distribution.
GenericClusteringStrategy$getBestClusterDistribution()
A list of clusters. Each list element represents a feature group.
getUnclustered()
The function is used to return the features that cannot be clustered due to incompatibilities with the used heuristic.
GenericClusteringStrategy$getUnclustered()
A character vector containing the unclassified features.
execute()
Abstract function responsible of performing the clustering
strategy over the defined Subset
.
GenericClusteringStrategy$execute(verbose, ...)
verbose
A logical value to specify if more verbosity is needed.
...
Further arguments passed down to execute
function.
getDistribution()
Abstract function used to obtain the set of features following an specific clustering distribution.
GenericClusteringStrategy$getDistribution(
num.clusters = NULL,
num.groups = NULL,
include.unclustered = FALSE
)
num.clusters
A numeric value to select the number of clusters (define the distribution).
num.groups
A single or numeric vector value to identify a specific group that forms the clustering distribution.
include.unclustered
A logical value to determine if unclustered features should be included.
A list with the features comprising an specific clustering distribution.
createTrain()
Abstract function in charge of creating a
Trainset
object for training purposes.
GenericClusteringStrategy$createTrain(
subset,
num.cluster = NULL,
num.groups = NULL,
include.unclustered = FALSE
)
subset
A Subset
object used as a basis to create the
Trainset
num.cluster
A numeric value to select the number of clusters (define the distribution).
num.groups
A single or numeric vector value to identify a specific group that forms the clustering distribution.
include.unclustered
A logical value to determine if unclustered features should be included.
plot()
Abstract function responsible of creating a plot to visualize the clustering distribution.
GenericClusteringStrategy$plot(dir.path = NULL, file.name = NULL, ...)
file.name
The name of the PDF file where the plot is exported.
...
Further arguments passed down to execute
function.
saveCSV()
Abstract function to save the clustering distribution to a CSV file.
GenericClusteringStrategy$saveCSV(dir.path, name, num.clusters = NULL)
dir.path
The name of the directory to save the CSV file.
name
Defines the name of the CSV file.
num.clusters
An optional parameter to select the number of clusters to be saved. If not defined, all clusters will be saved.
clone()
The objects of this class are cloneable with this method.
GenericClusteringStrategy$clone(deep = FALSE)
deep
Whether to make a deep clone.
The GenericClusteringStrategy is an archetype class so it cannot be instantiated.
Subset
, GenericHeuristic