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

 
Maxim Dmitrievsky:

And in my opinion nobody needs all these codes) except for some service functions, and so everyone is busy doing something for themselves

This is a consequence of the hierarchy of knowledge perfection, what is accessible to the giraffe is not acceptable to the hippopotamus and vice versa. that's why there are different kinds of education by the level of perfection of knowledge, from primary high school to academic institutions.

Respectfully.

 


I saw this diagram of a percetron. Usually there is one adder, but here there are three. So there are three activation neurons?

I did so in MQL4:

   a1 = iAC(Symbol(), 0, 0);
   a2 = iAC(Symbol(), 0, 3);
   a3 = iAC(Symbol(), 0, 7);
   
   perceptron1[0]=w11 * a1 + w21 * a2 + w31 * a3;
   perceptron2[0]=w22 * a2 + w12 * a1 + w32 * a3;
   perceptron3[0]=w33 * a3 + w13 * a1 + w23 * a2;

I wonder, is it correct? As far as I know, each of three inputs (a1,a2,a3) is multiplied by its own weight depending on the adder.

Then I will try to replace the linear function with a sigmoidal activation function.

Who can say, is it better with one adder or with several, it is just not clear, whether it makes sense to use the same inputs with different weights?

And another thing I wanted to ask, if we take the minimum, two-layer network, then we will need a lot of variables for optimization, not to mention three or four layers.

I mean, if all the layers are optimized at once. How many variables can be used to the maximum in order to more or less get the tests, maybe there is some software for this purpose?

 
forexman77:

I'm interested if this is correct? As far as I understood, each of the three inputs a1,a2,a3 is multiplied by its own weight depending on which adder it hits.

Almost right, there is also a bias which is additionally added to the result

   perceptron1[0]=w11 * a1 + w21 * a2 + w31 * a3 + w01;
   perceptron2[0]=w22 * a2 + w12 * a1 + w32 * a3 + w02;
   perceptron3[0]=w33 * a3 + w13 * a1 + w23 * a2 + w03;

Most likely y1,y2,y3 values are used in the inner layer of the neuronkey, and these values themselves should also be used as input values for the next layer

perceptron4[0] = w14 * perceptron1[0] + w24 * perceptron2[0] + w34 * perceptron3[0] + w04;

Or if Y1,Y2,Y3 are output values, then several output neurons are used for classification - for example if the greatest value among Y1,Y2,Y3 is Y1, then the result is "class 1", if the greatest value is Y2, then the result is "class 2", if the greatest value is Y3, then the result is "class 3". If the neuron will be used for regression instead of classification, the output neuron will be only one. If there are only two classes, you can do with one output neuron (if the result is <0.5, then class1, if >=0.5, then class2).

It is very easy to add a sigmoid for the activation function of a neuron, you need such a function -

double sigmoid(double sum)
{
    if (sum < -15.0)
        return (0.0);
    else if (sum > 15.0)
        return (1.0);
    else
        return (1.0 / (1.0 + MathExp(-sum)));
}

And with it you already get a full-fledged neuron with an inner layer (with three perceptrons) and one output perceptron.

   perceptron1[0] = Sigmoid(w11 * a1 + w21 * a2 + w31 * a3);
   perceptron2[0] = Sigmoid(w22 * a2 + w12 * a1 + w32 * a3);
   perceptron3[0] = Sigmoid(w33 * a3 + w13 * a1 + w23 * a2);
   perceptron4[0] = Sigmoid(w14 * perceptron1[0] + w24 * perceptron2[0] + w34 * perceptron3[0] + w04);

result = perceptron4[0]

 
forexman77:

How many variables can be used as much as possible in order to more or less get tests, maybe there is some software for this purpose?

The number of weights in a neuron can be tens of thousands or more. In mql and R there are special bibiloteks for creating and training neuronics, it is better to work through them, rather than program your own neuron from scratch.

 
SanSanych Fomenko:

I see I'm not letting you breathe... take a breath and calm down.


The further you go, the more categorical you are ;))

 
SanSanych Fomenko:


This statement is very briefly formulated by the axiom of statistics (and all mathematics, by the way): Litter ON INPUT - Litter OUTPUT.

A person who does not know this, or does not apply it in practice - in my opinion belongs to the dense nerds, regardless of whether he knows the word Perspectron or not.


Quite right. I second that.

 
Maxim Dmitrievsky:

Yes, I accidentally mixed up the words, because I was reading about approximation at that moment


great ;))))

 
Oleg avtomat:

Absolutely right. I'm with you.


Do you support inadequate streams of consciousness in response to specific questions? I generally noticed long ago that with age people's consciousness gets stale, you tell him a word and he tells you a significant part of all his unsatisfied fantasies. Well, of course you do, because you communicate the same way. Or maybe it's not age, but a fundamental inability to concentrate on the point.

The art of answering is to immerse yourself in the questioner's problem, to become him for a while, to understand what he needs and to answer in a way that he understands. And just verbally bullshit is not art, but self-affirmation.

 
Maxim Dmitrievsky:

Do you support inadequate streams of consciousness in response to specific questions? I have long noticed that with age people's consciousness is getting stale, you tell him a word and he gives you a good part of all his unsatisfied fantasies. Well, of course you do, because you communicate the same way. Or maybe it's not age, but a fundamental inability to concentrate on the subject.

The art of responding is to immerse yourself in the questioner's problem, to become him for a while, to understand what he needs, and to answer in a way that he understands. I just fucked up is not art but self-assertion.


To avoid confusion and to be able to distinguish what is what -- approximation, interpolation, extrapolation, and other difficult for you terms -- you should open textbooks and learn. But you prefer to poke buttons and then try to figure out what you've poked at. And you don't have the knowledge you need to make sense of it. Then you'll get an understanding, and you'll be able to consciously plan experiments, and conduct meaningful experiments, and the results of your experiments will be clear to you.

 
Oleg avtomat:

To avoid confusion and to be able to distinguish what is what -- approximation, interpolation, extrapolation, and other terms that are difficult for you -- you should open your textbooks and learn. But you prefer to poke buttons and then try to figure out what you've poked at. And you don't have the knowledge you need to make sense of it. Study, and then you will come understanding, and you will be able to meaningfully plan experiments, and put meaningful experiments, and the results of experiments will be understandable to you.

Sorry, but you have not yet proved your importance in any of my questions, at least I have not seen it

You don't have to write like Captain Obvious and turn everything upside down to make you seem important again