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

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)
#> value.praznik_JMI value.anova.test value.variance DUMMY #> [1,] 0.6666667 0.3333333 0.6666667 0.5 #> [2,] 0.0000000 0.0000000 0.0000000 0.5 #> [3,] 0.3333333 1.0000000 1.0000000 0.5 #> [4,] 1.0000000 0.6666667 0.3333333 0.5