Deep learning framework for regression

Posted By: Smon

Deep learning framework for regression - 08/03/19 14:00

I really want to try my luck with regression instead of simple classification with deep learning. Unfortunately, there isn't any example code available.

The zorro developers gave these frameworks (strategy folder):

DeepLearn.r
DeepLearnH2O.r
DeepLearnKeras.r
DeepLearnMX.r

They are all set up for classification. What would I need to change to use these for regression? I'm especially interested in MXnet.
Posted By: laz

Re: Deep learning framework for regression - 08/05/19 15:11

In DeepLearn.r you can find the following:
Code
neural.train = function(model,XY) 
{
  XY <- as.matrix(XY)
  X <- XY[,-ncol(XY)]
  Y <- XY[,ncol(XY)]
  Y <- ifelse(Y > 0,1,0)
  Models[[model]] <<- sae.dnn.train(X,Y,
      hidden = c(10,30,10), 
      activationfun = "tanh", 
      learningrate = 0.5, 
      momentum = 0.5, 
      learningrate_scale = 1.0, 
      output = "sigm", 
      sae_output = "linear", 
      numepochs = 100, 
      batchsize = 100,
      hidden_dropout = 0, 
      visible_dropout = 0)
}

Start from here, Y <- ifelse(Y > 0,1,0) changes the target from trade returns to a 0/1 signal, you need to remove that...

Check sae.dnn.train, how can one do regression with it, test every step with a minimal example and data you know well...

for example - do sae.dnn.train regression on iris data wink

Find a metric, RMSE, MAE, Rsquared, read about them - use them - or write your own...

It is possible but it is a long way, i have done all that but i have connected the caret framework to zorro. Now i can do do both,

classification or regression with all caret models.
Posted By: Smon

Re: Deep learning framework for regression - 08/20/19 11:28

Thank you, I will check this out!
© 2024 lite-C Forums