Transformns an MLDR into binary or multiclass datasets

Share:

Description

Transforms an mldr object into one or serveral binary or multiclass datasets, returning them as data.frame objects

Usage

1

Arguments

mldr

The mldr object to transform

type

Indicates the type of transformation to apply. Possible types are:

  • "BR" Produces one or more binary datasets, each one with one label

  • "LP" Produces a multiclass dataset using each labelset as class label

labels

Vector with the label indexes to include in the transformation. All labels will be used if not specified

Value

A list of data.frames containing the resulting datasets (for BR) or a data.frame with the dataset (for LP). The result is no longer an mldr object, but a plain data.frame

Examples

1
2
3
library(mldr)
emotionsbr <- mldr_transform(emotions, type = "BR")
emotionslp <- mldr_transform(emotions, type = "LP")