0

I wanted to create a Neural Network with multiple outputs (Multiple Output Regression - not classification) - as I never used mlr I wanted to try it and failed right away before coming to the Neural Network part, as I could not find a "task" for multiple output regression. The documentation is not helpful at all.

library(mlr)

a<-1:20
b<-a*3
d<-data.frame(a=a,b=b,T1=(a+b),T2=sin(a))

#make a regression task for target variables
task<- makeRegrTask(data = d, target = c("T1","T2"))

#Error in makeRegrTask(data = d, target = c("T1", "T2")) : 
#Assertion on 'target' failed: Must have length 1.

PS: I don't really have to use Neural Network, so I'm open for other suggestions with MLR as well as long as it's one model with multiple ouputs.

katsumi
  • 154
  • 8

2 Answers2

0

Multiple output regression isn't supported in mlr at the moment.

Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204
  • It seems the same for caret. its very disappointing that these highly sophisticated and useful framworks doent support such a "simple" thing but I guess there is a reason behind. Are multi outputs an unwise idea? I would like to use them so I have possible implicit constraints between outputs within one model. – katsumi Jul 20 '17 at 09:37
  • It looks like sklearn supports it. Whether you'd want to use it depends on what exactly you want to do. – Lars Kotthoff Jul 20 '17 at 17:32
  • Hmm sklearn is python... intersting though that it beats two competing R framworks in this case. Given that I initially wanted to use NNs, the native support of Keras/Tensorflow makes python even more an option to consider... – katsumi Jul 25 '17 at 10:42
0

Currently multilabel classification is supported which is the same but for classification. So it would not be too difficult to extend mlr regarding this...

PhilippPro
  • 659
  • 4
  • 12