Skip to content

Error: target transformation in spatial regression tasks #1281

@jgloeggler

Description

@jgloeggler
library(mlr3)
library(mlr3spatiotempcv)
library(mlr3learners)
library(mlr3pipelines)

task = tsk("cookfarm_mlr3")

log_task = mlr3pipelines::PipeOpTargetMutate$new("logtrafo", param_vals = list(
  trafo = function(x) log(x),
  inverter = function(x) list(response = exp(x)$response))
)

log_task$train(list(task))

Results in:

Error in .__Task__col_roles(self = self, private = private, super = super,  : 
  Assertion on 'names of col_roles' failed: Names must be a permutation of set {'feature','target','name','order','stratum','group','weight','coordinate','space','time'}, but has extra elements {'always_included'}.
This happened PipeOp logtrafo's $train()

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions