esl {utiml}R Documentation

Ensemble of Single Label

Description

Create an Ensemble of Single Label model for multilabel classification.

Usage

esl(
  mdata,
  base.algorithm = getOption("utiml.base.algorithm", "SVM"),
  m = 10,
  w = 1,
  ...,
  cores = getOption("utiml.cores", 1),
  seed = getOption("utiml.seed", NA)
)

Arguments

mdata

A mldr dataset used to train the binary models.

base.algorithm

A string with the name of the base algorithm (Default: options("utiml.base.algorithm", "SVM"))

m

The number of members used in the ensemble. (Default: 10)

w

The weight given to the choice of the less frequent labels. When it is 0, the labels will be random choose, when it is 1 the complement of the label frequency is used as the probability to choose each label. Values greater than 1 will privilege the less frequent labels. (Default: 1)

...

Others arguments passed to the base algorithm for all subproblems

cores

The number of cores to parallelize the training. (Default: options("utiml.cores", 1))

seed

An optional integer used to set the seed. This is useful when the method is run in parallel. (Default: options("utiml.seed", NA))

Details

ESL is an ensemble of multi-class model that uses the less frequent labels. This is based on the label ignore approach different members of the ensemble.

Value

An object of class ESLmodel containing the set of fitted models, including:

labels

A vector with the labels' frequencies.

models

A list of the multi-class models.

See Also

Other Transformation methods: brplus(), br(), cc(), clr(), dbr(), ebr(), ecc(), eps(), homer(), lift(), lp(), mbr(), ns(), ppt(), prudent(), ps(), rakel(), rdbr(), rpc()

Examples

model <- esl(toyml, "RANDOM")
pred <- predict(model, toyml)


# Use SVM as base algorithm
model <- esl(toyml, "SVM")
pred <- predict(model, toyml)

# Change the base algorithm and use 2 CORES
model <- esl(toyml[1:50], 'RF', cores = 2, seed = 123)

# Set a parameters for all subproblems
model <- esl(toyml, 'KNN', k=5)


[Package utiml version 0.1.7 Index]