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

 
Yury Reshetov:



Maybe it would be better to integrate into R?

And more people will be able to work and mt5 bridges with R seem to be available

 
Dr.Trader:

I've never tried it that way, but technically you could also treat the target variable as a predictor by including it in the pca model. Then, in the new data its value will be unknown, accordingly pca can fill in these missing values.

I tried predicting heads of components and got nothing interesting...

You can try too, there is a very good and well documented package for this "Rssa".

 
Dr.Trader:

No, that's okay. Since the predictors used for each of the principal components are known, you can safely sift out those predictors that are not used in the principal components.

What do you mean they are not used? PCA is a linear transformation. Removable dimensions are those that can be obtained by a linear combination of the others. That means that any predictor can be obtained by a linear combination of the principal components. if you take a 95% interval, there's a good chance of losing a good predictor stupidly because of scale, an interval less than 100% is only used in lossy data compression, otherwise only those components that are zero are always cut off.

 
mytarmailS:
Damn, I suspected that not by accident there these "NA"-shkas are thrown in the date, but I read the manual, it clearly says PCA with neural network, but then it is still not clear how this man from the site got this beautiful picture with a good separation by classes

The pictures have a different point there... The article itself is not about classification, but about clustering. You have data, and you need to divide them into groups somehow. So you don't even know how many groups you'll get - two, three, or ten... The author uses a graph of the first two components from PCA, where the importance is how close to each other the points in one group are. The colors are already a comparative analysis, and are assigned from already known target variables, which are not calculated, but simply taken ready from the table. If the groups of points are also distributed correctly by color, then everything is okay, the method seems to work, you can try it on other data. But there are really zero predictions in the article, only clustering and comparison with known classification.

You can draw a similar graph from the article in my previous post. The result will be a graph like this: http://i0.wp.com/www.win-vector.com/dfiles/YAwarePCA_files/figure-html/scaledplotest-1.png No nice clustering here, different input data. But if you use table iris as input data you will get something similar to graphs from article you gave.

 
Combinator:
PCA was originally intended to reduce the dimensionality of the original series. That's it. To use it to select predictors is the most delusional nonsense.
Could you please refute the PROPER content of the article I linked to. At this pointDr.Trader: has attempted to use this material. To use it quite specifically. The result is negative. Maybe in the same way you can object?
Principal Components Regression, Pt. 3: Picking the Number of Components | R-bloggers
Principal Components Regression, Pt. 3: Picking the Number of Components | R-bloggers
  • Nina Zumel
  • www.r-bloggers.com
In our previous note we demonstrated Y-Aware PCA and other y-aware approaches to dimensionality reduction in a predictive modeling context, specifically Principal Components Regression (PCR). For our examples, we selected the appropriate number of principal components by eye. In this note, we will look at ways to select the appropriate number...
 
mytarmailS:

Maybe it would be better to integrate into R?

And more people will be able to work and mt5 bridges with R seem to exist

Judging by the fact that Dr.Trader already failed when trying to port old libVMR version to R and didn't have enough memory for a large nuclear machine, as well as full performance for a small one (the number of cycles was reduced by 100 times), then who wants to step on the same rake is unlikely to be?


So, it's better not to start talking about porting for R such tasks yet - this nag won't pull.

 
Yury Reshetov:

Judging by the fact that Dr.Trader already failed when trying to port the old version of libVMR to R and did not have enough memory for a large nuclear machine, as well as full performance for a small (the number of cycles reduced by 100 times), then who wants to step on the same rake is unlikely to be found?


So, it's better not to breathe a word about porting such problems to R - this clunker is not up to the task.

I meant to create a package for "R" .

"R" consists of 70% of packages written in other languages (C++, C, fortran, java...) so the processing speed shouldn't suffer, or am I missing something?

the famous "h2o" package is all written in java

 
mytarmailS:

I meant to create a package for "R" .

"R" consists of about 70% of packages written in "foreign" languages (C++,C,fortran,java...) so processing speed should not suffer, or am I missing something?

the famous "h2o" package is all written in java

I didn't know that. I will try to look for instructions on creating packages in Java.
 
Yury Reshetov:


More specifically in the report file:

/**
* The quality of modeling in out of sample:
*
* TruePositives: 182
* TrueNegatives: 181
* FalsePositives: 1
* FalseNegatives: 1
* Total patterns in out of samples with statistics: 365
* Total errors in out of sample: 2
* Sensitivity of generalization abiliy: 99.4535519125683%
* Specificity of generalization ability: 99.45054945054946%
* Generalization ability: 98.90410136311776%
* Indicator by Reshetov: 8.852456238401455
*/

Sorry, I don't believe it, it's too graphical. Repeat the experiment, please? I have attached another archive, there data for a different time period. Model training should be on train.csv, test on test_notarget.csv. I'm interested in results predicted for file test_notarget.csv. The file for the test doesn't contain target variable, to be fair. But there is one more passworded archive with results for test test.csv, I will give me password for test comparison in exchange for predicted results.

Files:
forex_test.zip  2699 kb
 
Combinator:

What do you mean they are not used? PCA is a linear transformation. Removable dimensions -- those that can be obtained by a linear combination of the others. This means that any predictor can be obtained by a linear combination of the principal components. if you take a 95% interval, there is a good chance of losing a good predictor stupidly because of scale, an interval less than 100% is only used in lossy data compression, otherwise only those components that are zero are always cut off.

I didn't put it accurately, but you got it right. The point is exactly to take components sufficient for 95% accuracy, and everything else is discarded. Example: let's say there are 10000 predictors, it means 10000 components can be created for guaranteed accuracy of 100%. Then we can discard 9,900 components, leaving 100, but the accuracy will drop only 5%, from 100% to 95%. Then we are left with analyzing the remaining 100 components and removing predictors that are not used in them. A loss of 5% is not a problem here, because it is important to predict the target variable, not to recreate the original data without loss.
Reason: