Learn R Programming

mldr (version 0.2.82)

mldr_transform: Transformns an MLDR into binary or multiclass datasets

Description

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

Usage

mldr_transform(mldr, type = "BR", labels)

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

Run this code
library(mldr)
emotionsbr <- mldr_transform(emotions, type = "BR")
emotionslp <- mldr_transform(emotions, type = "LP")

Run the code above in your browser using DataLab