Market etiquette or good manners in a minefield - page 37

 

OK, I think I've figured out what my mistake is. I actually get that the length of training vector is equal to the number of weights! Because I accumulate corrections by comparing the output of a neuron with each sample of the training vector, while I need to compare it only with n+1th sample. I'm writing a new code.

That's why the graphs are so abnormal.

 

Here, have a look:


Blue is the training sample, red is the test sample. The tangent values are in the top left corner of the picture.

Oddly, I had to remove the initial initialisation of the scales altogether. Only then did the results become repeatable. There are still some questions, but I'm all done now... -:)

I'm attaching the listing. Sorry, no comments there yet, but it's done very simply, without a bunch of different functions - everything in one procedure, except tangents and mnc.

Files:
neyrona.rar  132 kb
 

It seems to me that you have a very complicated logic of numbering luuch vector...

Maybe the error is a trivial mix-up of indices, or you are zeroing weights only once during the whole statistical set procedure(W[i]<-0):

Note that your D vector, which is the input to the NS, is not recalculated with the set of stats (index i). Maybe I'm wrong, because I'm not entirely familiar with it. It was easier for me to enter consecutive numbering in your code, and that's what I got:

Now, your girl senses the initial randomisation of the weights and learns adequately (both lines go through the origin). Red is the training sample, blue is the exam. A file with the tweaked version is attached below.

Files:
modif.zip  16 kb
 

Getting acquainted...

Tell me, Sergey, why your two-layer neuron (and you've been saying it from the beginning) has no activation function? And then how would the derivative change? I.e. was (for th) (1-OUT^2)

and becomes (1-OUT) ?

P.S. Thanks for your help

 

Aha! I finally understand how this thing works. Aren't the single inputs only needed for the learning period, and then they are used like all the others - for data?

I didn't even think of such a thing! Besides, inputs there are all simple - no hypertangents. Is it because BP is a regular function, or just for the sake of example?

And another question: if the girl is slightly undertrained - well give her only 5-7 epochs - then the tangents of both mncs will be greater than unity, doesn't that indicate that the girl is looking into the future (I'm not talking about the sine)?

 

It can be rigorously shown (citing the works of mathematicians) that for a single layer NS, activation of the output by a non-linear function does not add to its computational power compared to the linear output. Therefore, a single neuron with nonlinear FA is nonsense.

For bilayer NS the activation of output neuron does not add computational power (this architecture already has maximum or equal computational power of all possible architectures - 3, 4, etc.), so activation of output neuron by hypertangent is reasonable to use if output is further interpreted as probability of accurate prediction.

In the case of linear output, the derivative is not (1-OUT) but simply 1 - it is the derivative of the linear function y(x)=1*x.

As for the single inputs, they are of course used both during training and during operation. Well done for spotting it! I missed this bug. The correct way to represent a neuron is this:

W[0] is a weight that is always fed with 1. In case of a single neuron, the effect of using an offset is not very noticeable. Although it is not difficult to simulate a situation where it would play an important role in speeding up the learning process in this case as well.

если девушку слегка недообучить - ну дать её всего 5-7 эпох - то тангенсы обеих мнк будут больше единицы, не говорит ли это о том, что девушка заглядывает в будущее(я не об синусе)?

No, it only indicates a small amount of statistical material and poor learning. Judge for yourself: you can't know something better than it actually is. This limiting case corresponds to tg()=1 and can only be greater than 1 because of statistical variation in the data.

 
Neutron >> :

...cite the works of mathematicians


-:) I hope you realise how useless that is... at least in my case.

I'm going to have another go at this one neuron. I need to get it all settled in my head, and I want to break the code into simple blocks, and tomorrow I will try to add another layer to my girlfriend. But I have a rather silly question: when rewriting the code from Matkad to MQL, how do you check what has been done? You can't rewrite it directly - Matcad is a different environment and its program logic is not the same as in MQL.

 

That's where it gets tricky!

For example, I output the slope tangent (in case of valid inputs) as an integral characteristic of NS performance or percentage of correctly guessed signs (in case of binary ones) and compare it with those in Matcad. However, up to this point, you need to peripisce NS-ka by MCL standard, it is when zero count is last and further into depth (in Matkadeck vice versa). Besides, it is necessary to check the correctness of NS on viner process, which is when BP is obtained by integration of a random variable. Here your girl should get an iron "D" on exams, and it will tell you that she is not cheating, i.e. tangent of slope angle must tend to zero with number of experiments tending to infinity as 1/n.

This is the generator of a Wiener series:

 

It's on the vinaire:


 

I'll just take a moment: nothing has remained of my last chart, where I was going to look for the cause of the "miracle" - iFractals has shamelessly cheated me again. As soon as I wrote my own iFractals it all cleared up, i.e. the miracle disappeared :)

Good luck, colleagues