Skip exporting Signals.csv for DeepLearning -> save time

Posted By: Smon

Skip exporting Signals.csv for DeepLearning -> save time - 04/09/20 05:39

I'm building a script with deep learning. It takes ages, to export the signals.csv datafiles, because I'm using indicators which rely on R and the slow R-Bridge.

I don't want to let this CSV file be recreated when it's already there. I have incorporated the number of the WFOCycle, Asset and number of columns into the filenames to make these files unique.

I know how to check if a file is present, but how can I skip this very step of exporting the signals and creating the CSV files?
Posted By: Smon

Re: Skip exporting Signals.csv for DeepLearning -> save time - 04/09/20 12:13

Okay, I made some progress:

I can skip the execution with

Code
if(is(RULCYCLE)) return;


Now I just need to find out how I can trigger the neural.train() in R after each RULCYCLE. This should be easy.
Posted By: Smon

Re: Skip exporting Signals.csv for DeepLearning -> save time - 04/09/20 18:11

More difficult than I thought!

The filename of the CSV file is set with this:

Code
string signals_csv()
{
	return slash(strf("%sData\\%d_%s_%s_%i.csv", ZorroFolder, WFOCycle, Script, strx(Asset,"/",""), Core));
}



I thought I'd just put this at the beginning of my trading script:

Code
	if(file_length(signals_csv()) > 0)
	{
		adviseLong(NEURAL, 0, 0);  //don't want to lose all the convenience!!!
		return;
	}


I want adviseLong to trigger the neural.train() in R for me.

In neural(NEURAL_TRAIN, ...) I'm preventing the CSV from being overwritten with:

Code
if(file_length(name == 0)) file_write(name,Data,0);


However, the training in R isn't triggered. Why?
Posted By: tomaslolo

Re: Skip exporting Signals.csv for DeepLearning -> save time - 06/19/23 09:29

Hello Smon! Did you find the way to skip the csv creation, so we can train a customised one?

Thank you!
© 2024 lite-C Forums