NEURAL and multiple objectives - what's the easiest way?

Posted By: Smon

NEURAL and multiple objectives - what's the easiest way? - 04/03/20 10:16

I want to trigger trades with two predicted values.

The manual states:

Quote

For training multiple objectives with the NEURAL method, pass the further objectives as Signal parameters to the advise function. For debugging, use the R sink function for printing R output to a file.


Now it's super clear how to pass the second objective into the R session, but it seems, there is no convenient way to get the 2-dimensional prediction back to Zorro through the advise functions.

I'm seeing three options here, how I must alter the neural function:

a) change the type of the function to a 2-dim array -> probably causing all kinds of new problems
b) declare a global array in which the neural function writes its predictions.
c) training two different models, one with adviseLong and one with adviseShort (I'd like to avoid that because it will use double the time to train a single model)

What's the easiest way? Is there a better way?
Posted By: jcl

Re: NEURAL and multiple objectives - what's the easiest way? - 04/03/20 11:40

The easiest way is c). For the other ways, call advise with multiple objectives for training only. For test and trading, use a separate prediction function that loads the current model and returns the prediction array as a vector from R.
Posted By: Smon

Re: NEURAL and multiple objectives - what's the easiest way? - 04/03/20 13:03

Thanks!
© 2024 lite-C Forums