The Trainset is used to perform training
operations over M.L. models. A target class should be defined to guarantee a
full compatibility with supervised models.
new()Method for initializing the object arguments during runtime.
Trainset$new(cluster.dist, class.name, class.values, positive.class)cluster.distThe type of cluster distribution used as basis
to build the Trainset. See
GenericClusteringStrategy for more information.
class.nameUsed to specify the name of the column containing the target class.
class.valuesSpecifies all the possible values of the target class.
positive.classA character with the value of the positive class.
getPositiveClass()The function is used to obtain the value of the positive class.
Trainset$getPositiveClass()A numeric value with the positive class value.
getClassName()The function is used to return the name of the target class.
Trainset$getClassName()A character vector with length 1.
getClassValues()The function is used to compute all the possible target class values.
Trainset$getClassValues()A factor value.
getColumnNames()The function returns the name of the columns comprising an specific cluster distribution.
Trainset$getColumnNames(num.cluster)num.clusterA numeric value used to specify the cluster
number of the cluster distribution used when creating the
Trainset.
A character vector with all column names.
getFeatureValues()The function returns the values of the columns comprising an specific cluster distribution. Target class is omitted.
Trainset$getFeatureValues(num.cluster)num.clusterA numeric value used to specify the cluster
number of the cluster distribution used when creating the
Trainset.
A data.frame with the values of the features comprising the selected cluster distribution.
getInstances()The function returns the values of the columns comprising an specific cluster distribution. Target class is included as the last column.
Trainset$getInstances(num.cluster)num.clusterA numeric value used to specify the cluster
number of the cluster distribution used when creating the
Trainset.
A data.frame with the values of the features comprising the selected cluster distribution.
getNumClusters()The function obtains the number of groups (clusters) that forms the cluster distribution.
Trainset$getNumClusters()A numeric vector of size 1.
Use Dataset object to ensure the creation of a valid
Trainset object.
Dataset, DatasetLoader,
Subset, GenericClusteringStrategy