makeFilterMat: Create a Filter-Matrix

View source: R/filtermat.R

makeFilterMatR Documentation

Create a Filter-Matrix

Description

A Filter-Matrix can be used in combination with mutUniformMetaReset for heuristic-supported biased mutation.

Usage

makeFilterMat(
  task,
  filters,
  expectfeatfrac = 0.5,
  expectfeats = getTaskNFeats(task) * expectfeatfrac,
  minprob = 0,
  maxprob = 1
)

Arguments

task

[Task] The task to generate filter information for.

filters

[character] The filters to use. Special vilter "DUMMY" gives a constant column of expectfeatfrac.

expectfeatfrac

[numeric(1)] The expected fraction of features to have in equilibrium. Ignored if expectfeats is given.

expectfeats

[numeric(1)] The expected number of features to have in equilibrium.

minprob

[numeric(1)] The minimum probability for each feature.

maxprob

[numeric(1)] The maximum probability for each feature.

Value

matrix

Examples

library("mlr")

# Example for iris task
filters <- c("praznik_JMI", "anova.test", "variance", "DUMMY")
fima <- makeFilterMat(iris.task, filters = filters)
print(fima)


mosmafs documentation built on Nov. 3, 2022, 1:05 a.m.