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)subsetA Subset object to perform the clustering strategy.
heuristicThe heuristic to be applied. Must inherit from
GenericHeuristic class.
descriptionA character vector describing the strategy operation.
configurationOptional 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, ...)verboseA 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.clustersA numeric value to select the number of clusters (define the distribution).
num.groupsA single or numeric vector value to identify a specific group that forms the clustering distribution.
include.unclusteredA 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
)subsetA Subset object used as a basis to create the
Trainset
num.clusterA numeric value to select the number of clusters (define the distribution).
num.groupsA single or numeric vector value to identify a specific group that forms the clustering distribution.
include.unclusteredA 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.nameThe 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.pathThe name of the directory to save the CSV file.
nameDefines the name of the CSV file.
num.clustersAn 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)deepWhether to make a deep clone.
The GenericClusteringStrategy is an archetype class so it cannot be instantiated.
Subset, GenericHeuristic