You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Somehow...
Somehow...
Thank you! You can see the hand of the master right away! I'll be trying it out tomorrow to see what comes out.
Somehow...
Started to try out the code, created an artificial example - filled in the array
Got it:
I.e. we got one variant, but we're expecting another variant as well.
Is it possible to teach the algorithm to find it too?
Started to try out the code, created an artificial example - filled in the array
Got it:
That is, we got one variant, but we are expecting another variant as well.
Can the algorithm learn to find it too?
And the variant "0-1 3-6 7-9" is not better than the variant "0 - 0-1 2-5 7-9" - both are from 0 to 1 and have 2 skips of length 1 each.
Two options appear in this case:
1 - do the same thing, but from the end of the set of skips.
2 - look right away not for the closest segment, but with a tolerance. But in this case there will be even more if there are a lot of data and a lot of docking sequences.
However after variant 1 you will want to start building chains from all possible starting positions. This is correct, but the amount of work for the algorithm increases considerably.
Yes! It is necessary to start construction of variants from each of the segments of the initial set and continue construction to the beginning and the end.
And the option "0-1 3-6 7-9" is no better than the option "0 - 0-1 2-5 7-9" - both are from 0 to 1 and have 2 skips of length 1 each.
In this case they are equal, I agree, but they are different and by the terms of the problem we will need to estimate the sum of their scores, and until we build a line we will not know the combined score of all the segments.
However, after option 1, there will be a desire to start constructing strings from all possible starting positions. This is correct, but the amount of work for the algorithm increases considerably.
Yes! It is necessary to start construction of variants from each of the segments of the initial set and continue construction to the beginning and the end.
This also seems to me to be the more correct strategy! However, I think there may be duplicate variants.
Can you help by writing some code?
The duplicates were not sifted from the array, only marked. Since each variant now stores the segments in two arrays, to make it more convenient, they can be combined into one array using theCombine() method.
I didn't sift the duplicates from the array, I only marked them. Since now each variant stores the segments in two arrays, you can combine them into one array using theCombine() method to make it more convenient.
Dmitry, thanks for the new algorithm!
Yes, there are indeed a lot of copies.
As I understand it, they can't be counted. I hadn't managed to wait for the combination of 1000 elements - my netbook started to run out of memory :(
And is it possible not to use all combinations when adding a segment, but only a certain number of possible in the current step, say, the best 10?
Dmitry, thanks for the new algorithm!
Yes, there are indeed a lot of copies.
As I understand it, you can not count them. I couldn't wait for the combination of 1000 elements - my netbook started to run out of memory :(
Is it possible not to use all combinations when adding a segment, but only a certain number of possible in the current step, say, the best 10?
To know that they are the best, you have to compare them with others, i.e. you have to get all of them first. Another thing is to somehow optimize the algorithm, but I don't have a goal to devote my life to this algorithm.)
Maybe decide on the criterion of sufficiency and first get all options, starting from only one segment, randomly chosen, and so on, until a satisfactory option appears.
And the second option can be accelerated - to scale the array with variants not one element at a time, but several dozens of elements at once, and at the end to trim it.
To know that they are the best, you have to compare them with others, i.e. you have to get all of them first. Another thing is to optimise the algorithm somehow, but I don't have the goal of devoting my life to this algorithm.)
I'm talking about a single segment, let's say it has a coefficient to evaluate its quality, then after each iteration we branch, for example, only on the top 10 of these coefficients.
Maybe decide on a sufficiency criterion and first get all variants, starting from only one segment, randomly chosen and so on, until a satisfactory variant appears.
Unfortunately, "sufficiency" is difficult to estimate here - here it is necessary to know a standard, then from it it is possible to define a tolerance, and I do not have a standard.
And the second option can be accelerated - to scale array with options not one element at a time, but several dozens of elements, and at the end of it to align.
I'm not quite sure what you mean by paralleling using OpenCL?
1. I'm talking about a single segment, let's say it has a coefficient to assess its quality, then after each iteration we branch to, for example, only the top 10 of those coefficients.
2. Unfortunately, "sufficiency" is difficult to estimate here - you need to know the benchmark, then you can determine the tolerance from it, and I don't have a benchmark.
3. I'm not quite sure what you mean by paralleling using OpenCL?
1. Where is this coefficient?
2. what about point 1?
3. no, it's simpler. Ok, I'll try to speed it up tomorrow.