Trainset: Trainning set.

TrainsetR Documentation

Trainning set.

Description

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.

Details

Use Dataset object to ensure the creation of a valid Trainset object.

Methods

Public methods


Method new()

Method for initializing the object arguments during runtime.

Usage
Trainset$new(cluster.dist, class.name, class.values, positive.class)
Arguments
cluster.dist

The type of cluster distribution used as basis to build the Trainset. See GenericClusteringStrategy for more information.

class.name

Used to specify the name of the column containing the target class.

class.values

Specifies all the possible values of the target class.

positive.class

A character with the value of the positive class.


Method getPositiveClass()

The function is used to obtain the value of the positive class.

Usage
Trainset$getPositiveClass()
Returns

A numeric value with the positive class value.


Method getClassName()

The function is used to return the name of the target class.

Usage
Trainset$getClassName()
Returns

A character vector with length 1.


Method getClassValues()

The function is used to compute all the possible target class values.

Usage
Trainset$getClassValues()
Returns

A factor value.


Method getColumnNames()

The function returns the name of the columns comprising an specific cluster distribution.

Usage
Trainset$getColumnNames(num.cluster)
Arguments
num.cluster

A numeric value used to specify the cluster number of the cluster distribution used when creating the Trainset.

Returns

A character vector with all column names.


Method getFeatureValues()

The function returns the values of the columns comprising an specific cluster distribution. Target class is omitted.

Usage
Trainset$getFeatureValues(num.cluster)
Arguments
num.cluster

A numeric value used to specify the cluster number of the cluster distribution used when creating the Trainset.

Returns

A data.frame with the values of the features comprising the selected cluster distribution.


Method getInstances()

The function returns the values of the columns comprising an specific cluster distribution. Target class is included as the last column.

Usage
Trainset$getInstances(num.cluster)
Arguments
num.cluster

A numeric value used to specify the cluster number of the cluster distribution used when creating the Trainset.

Returns

A data.frame with the values of the features comprising the selected cluster distribution.


Method getNumClusters()

The function obtains the number of groups (clusters) that forms the cluster distribution.

Usage
Trainset$getNumClusters()
Returns

A numeric vector of size 1.

See Also

Dataset, DatasetLoader, Subset, GenericClusteringStrategy


D2MCS documentation built on Aug. 23, 2022, 5:07 p.m.