Numerical series density - page 21

 
Vyacheslav Kornev:
We have 50 cells and 11 dice with numbers.
1, 3, 6, 8, 10, 11, 15, 16, 30, 40,50
V1. The densest clusters are: 10,11 и 15,16.

V2. Less dense are: 1,3 and 6,8,10,11 and 15,16

V3. Even less dense are 1,3,6,8,10,11 and 15,6

V4. Then 1,3,6,8,10,11,15,16.

The bottom line is this. We have picked up the delta. That is, we calculate v2 because in this variant there are the most clusters

Aggregation 1,3 takes 3 cells out of 50, i.e. 1.5 cells per cube.

Cluster 6,8,10,11 takes up 6 cells. And here 1.5 cells per cube. I won't go any further.

You didn't want to put 10 and 11 in a separate cluster.




In fact, you should know that we've already calculated the centres of mass in the number series. That is the highest density.

And the numbers around them are within the median delta of all the numbers and form clusters.
Does that not work for you?
 
Vyacheslav Kornev:
Does this option not work for you?

I told you that it's not clear how to use this option, because the division into groups depends on the number of deltas or the minimum delta step.

Did you run my script last time?

It processes numbers and finds densities - below visualization - numbers - weekly bar closing price on GBPUSD from 01.02.2015 to 25.12.2016 - 100 digits

Can you do the same calculation for your algorithm?

 
-Aleks-:

So you're asking me the same questions I'm looking for answers to :)

That's why I'm wondering what criterion to use to sift out clusters - and whether sifting them will be correct.

I can sift out more - regulated by % of remaining deltas relative to all numbers - now it is 50%, but I can also do it by 10% - your algorithm does not allow to automate this process now.

Now according to your algorithm there are 132 different deltas - how to select the necessary deltas from them is a question - it is clear that from the smallest, but it is not clear to what is the largest.

Just a quick look at the algorithm :

1. Deltas are calculated (distances between adjacent points)

2. Grouping of gradually increasing and decreasing points (local extrema are actually found, we obtain a la zigzag where depressions point to tight groups and peaks point to gaps between them)

3. 2 separate procedures with tops and troughs are implemented analogous to subclauses 1, 2. That is from one zigzag obtained 2. One zigzag was made by set of vertices, and the troughs are located in the area of maximal rarefaction. And in the other one the troughs hit the maximum density. In theory the two zigzags should be more or less in antiphase.
 
Maxim Kuznetsov:
alg. at a glance :

1. Deltas are calculated (distances between adjacent points)

2. Grouping of gradually increasing and decreasing points (local extrema are actually found, we obtain a zigzag pattern where depressions point to tight groups and peaks point to gaps between them)

3. 2 separate procedures with tops and troughs are implemented analogous to subclauses 1, 2. That is from one zigzag obtained 2. One zigzag was made by set of vertices, and the troughs are located in the area of maximal rarefaction. And in the other one the troughs hit the maximum density. In theory the two zigzags should be more or less in antiphase.

A deep thought, but only you can make an example from it! Maybe you can show me your thought process on the above 20 numbers to make it clearer?

 

On the graph I have added the result with a 30% filter

I have added to the script the ability to select the % delta filtering numbers.

Files:
 
-Aleks-:

A deep thought, but only you can make an example from it! Maybe you can show me your thought process on the above 20 numbers - to make it clearer?

Algorithm for quite large arrays (on 1-2 steps even a random set discharges about 3 times, then twice more, and repeat... the control set turns out to be about 300 points)
The principle is very simple, we go along a numeric series and the more frequent the points, the higher their density (just from the definition of density). We find extrema that will indicate groups of "densifications".
Repeat for "groups" and find group density and sparsity.

1. If we illustrate with your 20 numbers :



i.e. by arrows we just mark - deltas are decreasing (right arrow) or increasing (left arrow). On the left side we get circles - local groups. The circles on the right are local intervals. (This figure is exactly a zigzag and if necessary, it can be treated in the same way)

Next, count deltas between left small circles and repeat the same procedure to get density/dilution of gaps.

And for the circles on the right, in the same way, we get the density/dilution of the groups.
 
By the way, it's funny - you can measure the "immeasurable" - market nervousness, acceleration/deceleration and even by ticks :-)
 
Maxim Kuznetsov:
By the way, it's funny - this way you can measure "unmeasurable" - market volatility, acceleration/deceleration, and even by ticks :-)

Let's deal with a simple one - below is a table - two variants of delta counting

NO.P./P.NumberDelta++ V1-- V1++ V2-- V2
1 10
2 13 3 3 3
3 15 2 2 2
4 21 6 6
5 31 10 10 10
6 40 9 9
7 42 2 2 2
8 46 4 4
9 51 5 5
10 56 5 5
11 65 9 9 9
12 71 6 6 6
13 78 7 7 7
14 81 3 3 3
15 190 109 109 109
16 223 33 33
17 232 9 9 9
18 250 18 18 18
19 260 10 10 10
20 545 285 285 285
Total: 461 74 441 32

Or should I delta from V2 between ++ and -- ?


 
-Aleks-:

Let's keep it simple for now - below is a table - two options for which deltas should be counted

NO.P./P.NumberDelta++ V1-- V1++ V2-- V2
1 10
2 13 3 3 3
3 15 2 2 2
4 21 6 6
5 31 10 10 10
6 40 9 9
7 42 2 2 2
8 46 4 4
9 51 5 5
10 56 5 5
11 65 9 9 9
12 71 6 6 6
13 78 7 7 7
14 81 3 3 3
15 190 109 109 109
16 223 33 33
17 232 9 9 9
18 250 18 18 18
19 260 10 10 10
20 545 285 285 285
Total: 461 74 441 32

Or should the deltas from V2 be between ++ and -- ?


what kind of random numbers do you have in V1,V2 with ++ and with -- ? :-)
In your table I purple marked local delta maxima and green local minima (I made a mistake somewhere - it's not convenient to look at the tables at the website, I shaded the wrong one). Groups of points are defined.
Further, the same procedure to be followed with purple (to count deltas = 31-13, 46-13, 65-46...) and to identify their extremums.
 
Maxim Kuznetsov:
what kind of random numbers do you have in V1,V2 with ++ and with -- ? :-)
In your table I have specially marked purple - local maxima of deltas and local minima in green (I made a mistake somewhere - it's not convenient to use a site with tables, I shaded the wrong one). Groups of points are defined.
Further, the same procedure to be followed with purple (to count deltas = 31-13, 46-13, 65-46...) and to identify their extremums.

The numbers are not random, they are exactly those you emphasized ++ - maximum in growth, and -- minimum in decline. So I haven't figured out what to change yet - most of your colour marks coincided with V2, the rest, I may have errors - which you reported. Please clarify.