Machine learning in trading: theory, models, practice and algo-trading - page 413

 
Maxim Dmitrievsky:

Yeah, they probably made it so that you could have more than 2 classes... so it will probably be more clustering and you can use other methods like k-means :)
I don't know what to do with k-means at all... MS Azure has it, but as a ready-made solution, and here it's just an engine and I don't understand how to interpret its results...
 

In general, for classifying buy/sell, I advise to use one neuron with the activation function tanh, which definition area is (-1;+1).
Less data, and more obvious.

SoftMax, yes purely for classification, where the number of classes can be any. Recall(find) the task of classifying iris flowers.

And results by tanh (or alternatively sin) is very convenient then to display on the graph as an indicator.

https://en.wikipedia.org/wiki/Activation_function

In the screenshot, the bottom graph. Green/red - training signals; purple/blue - prediction by trained model.


 
elibrarius:
I don't understand what to do with k-means at all... MS Azure has it, but as a ready-made solution, but here it's just an engine and it's not clear how to interpret its results...

Well, it's for grouping homogeneous data, it works without a teacher, i.e. you don't know in advance the number of classes (clusters in this case)
 
Aleksey Terentev:

In general, for classifying buy/sell, I advise to use one neuron with the activation function tanh, which definition area is (-1;+1).
Less data, and more obvious.

SoftMax, yes purely for classification, where the number of classes can be any. Recall(find) the task of classifying iris flowers.

And results by tanh (or alternatively sin) is very convenient then to display on the graph as an indicator.

https://en.wikipedia.org/wiki/Activation_function

In the screenshot, the bottom graph. Green/red - training signals, purple/blue - prediction based on the trained model.



Isn't 1 neuron insufficient if the sample is large? )
 
Maxim Dmitrievsky:

won't 1 neuron be enough if the sample is large? )

Sorry, I was talking about the output layer. =)
 
Aleksey Terentev:

I'm sorry, I was talking about the output layer. =)


I made a grid in alglib with a linear output, but with a range limitation from -1 to 1, and it dog after training with new data still occasionally goes beyond it,

That's why I'm thinking of adding softmax now.

 
Maxim Dmitrievsky:


I made a grid in alglib with a linear output, but with a range limitation from -1 to 1, and it dog after training with new data still occasionally goes beyond it,

That's why I am thinking to add softmax now

if it goes out of range, it can be considered a very good signal = 150% ))
 
elibrarius:
if it goes out of bounds, it can be considered a very good signal = 150% ))

Yeah, sometimes instead of 0.1 there may be 1, maybe because the values are normalized differently in the training and then in the process of trading, the samples are different
 
Maxim Dmitrievsky:

Well this is for grouping homogeneous data, it works without a teacher, i.e. the number of classes (clusters in this case) is not known in advance

Why is it not known? The number of clusters to divide into - set at startup as an input value: K - desired number of clusters, K>=1

Suppose I have divided the data into 4 groups, what should I do with them?

 
Maxim Dmitrievsky:


I made a grid in alglib with a linear output, but with a range limitation from -1 to 1, and it dog after training on new data still occasionally goes beyond it,

That's why I am thinking to add softmax now

Unfortunately I did not deal with alglib, those ML packages that I got acquainted with, all allowed me to change the activation function of the layer.
Reason: