I'm using mlr3 for a regression learning. While using randomForest for regression, the model runs fine but when I access 'importance()' I get the following error:
Error in switch(pars[["importance"]], mse = imp[["%IncMSE"]], nodepurity = imp[["IncNodePurity"]], :
EXPR must be a length 1 vector
When I stop the code in browser mode, I do see that 'imp' has all the feature importance as the below screenshot shows:
Upon seeing the help page I also noticed that I need to set parameter 'importance' to either "mse" or "nodepurity" but it throws an error: unused argument (importance = "mse")
Can someone please help me?