Skip to content
Prev 28912 / 29559 Next

mlr3spatial

Hi,
I'm trying to apply a supervised regression following the example at
https://mlr3spatial.mlr-org.com/articles/mlr3spatial.html
In my case the response variable is a presence-absence (0/1) raster file
with many NA values

task = as_task_regr
<https://mlr3.mlr-org.com/reference/as_task_regr.html>(backend, target
= "presence-absence")

print <https://rdrr.io/r/base/print.html>(task)#> <TaskRegr:backend>
(122848 x 6)#> * Target: presence-absence#> * Properties: -#> *
Features (5):#>   - dbl (5): band2, band3, band4, band5, band6

At this point I need to extract the row_ids where
presence-absence != NA
in order to fill the

learner$train(task, row_ids = row_ids)

I have tried to search for an example but I could not find one.
Can anyone help me?
Thanks