Is it possible to change a feature in an mlr3 task object? I know that po("mutate")
can be used to engineer new feature, but i don't know if there is a way to change an existing one. I tried to change the features in the task itself, but it doesn't seem to be an option. Similar questions have been asked before without context. The reason I ask is because I want to calculate permutation feature importance on the test set. To do this, I'd like to iteratively replace each feature with a random permutation of itself without recreating the task each time.
Asked
Active
Viewed 36 times
0

Joseph Wood
- 7,077
- 2
- 30
- 65

Yodi
- 1
1 Answers
0
Yes, you can do this, for example with the mutate
pipeop, or by directly changing the features.
In your specific case, there's a much easier way to achieve what you want though. You can use the iml
package to directly compute permutation feature importance, see the mlr3 book.

Lars Kotthoff
- 107,425
- 16
- 204
- 204