x64 deep learning based on ML.NET

Created at 23 Apr 2019, 17:29
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
trader.calgo's avatar

trader.calgo

Joined 19.02.2018

x64 deep learning based on ML.NET
23 Apr 2019, 17:29


Hi,

I am currently working with ML.NET and the main data type is float there. In this library there are custom solutions CpuMath and other dll written only for version x64. For the further development of cTrader-based neural networks, it is very important to add a compiler for x64 processors!

if it is possible to compile under x64, tell us how to do it.


@trader.calgo
Replies

PanagiotisCharalampous
23 Apr 2019, 17:37

Hi trader.calgo,

While building in Visual Studio, just change the platform from Any CPU to x64.

Best Regards,

Panagiotis


@PanagiotisCharalampous

trader.calgo
23 Apr 2019, 17:59

Unfortunately, this method leaves a trail of inconsistency with the cBot copy in cTrader, in turn, cTrader suggests recompiling or running the x86 version. Accordingly, in both cases, the process ends with a version error.


@trader.calgo

PanagiotisCharalampous
24 Apr 2019, 10:08

Hi trader.calgo,

Can you please provide more information e.g. a cBot, some screenshots etc?

Best Regards,

Panagiotis


@PanagiotisCharalampous

trader.calgo
03 May 2019, 20:20

Dear Panagiotis,

Perhaps I was mistaken in the cause of the error, but I could not understand it on my own. I hope you can find out the reason and write if you can correct the error or not.

public ITransformer Train(MLContext mlContext, string dataPath)
        {
            IDataView dataView = mlContext.Data.LoadFromTextFile<BarLoad>(dataPath, hasHeader: true, separatorChar: ';');

            var pipeline = mlContext.Transforms.CopyColumns(outputColumnName: "Label", inputColumnName: "IsTrue").Append(mlContext.Transforms.Concatenate("Features", "signalup", "signaldown", "isbullish", "msclose", "mshigh", "mslow", "atr", "dpo", "lrrs",
            "mai", "rsi")).Append(mlContext.BinaryClassification.Trainers.AveragedPerceptron());

            var model = pipeline.Fit(dataView);
            Chart.DrawStaticText("LabelCast12", "\n==================== End of training ====================", VerticalAlignment.Top, cAlgo.API.HorizontalAlignment.Left, "Blue");
            SaveModelAsFile(mlContext, model, dataView);

            return model;
        }

AveragedPerceptron() calls the CpuMath library, and therefore an error occurs.

Source of the project attached.

ML.NET is a simple library, it is simply created to add machine learning to cTrader advisors. I hope this error is solved.


@trader.calgo

PanagiotisCharalampous
06 May 2019, 12:27 ( Updated at: 21 Dec 2023, 09:21 )

Hi trader.calgo,

Seems some files are needed as well.

Best Regards,

Panagiotis


@PanagiotisCharalampous

trader.calgo
06 May 2019, 19:45 ( Updated at: 21 Dec 2023, 09:21 )

RE:

Panagiotis Charalampous said:

Hi trader.calgo,

Seems some files are needed as well.

Best Regards,

Panagiotis

These files are generated by the advisor itself in the appropriate modes of operation for collecting training data. Here are the files. 

https://yadi.sk/d/RXDtvfkTNRwWzg

This error is not related to the absence of a library in the project. I think the reason is either in NETstandart 2.0 or in x64 architecture.

Please try to understand the reason.


@trader.calgo

PanagiotisCharalampous
07 May 2019, 10:24 ( Updated at: 21 Dec 2023, 09:21 )

Hi trader.calgo,

After placing the files in the correct directory, the cBot seems to be working fine for me

Best Regards,

Panagiotis


@PanagiotisCharalampous

trader.calgo
07 May 2019, 12:31

Thank you for doing this work for me. Now I know that the error is somewhere in my system. I am very grateful to you, then I'll figure it out myself.
P.S. Do not change the design of the beta version of cTrader, it is much better than before.))


@trader.calgo