By the way, does anyone know how to calculate the root of the Gini index (I understand how to calculate the root, but the Gini index itself)? I'd prefer a code example. It would be interesting to experiment with it. As I noted at the time "Giniindex and Gini coefficient are different things - don't confuse them". For the G ini coefficient we use a GSC, i.e. we add noise. I have attached to the article the found code for calculating R and PY. Index is something else.
By the way, does anyone know how to calculate the root of the Gini index (I understand how to calculate the root, but the Gini index itself)? I'd prefer an example of the code. It would be interesting to experiment with it. As I noted at the time "Giniindex and Gini coefficient are different things - don't confuse them". For the G ini coefficient we use a GSC, i.e. we add noise. I have attached to the article the found code for calculating R and PY. Index is something else.
There is Gini coefficient and there is Gini Impurity. The first is used as a metric in binary classification, article. The second is used in decision trees as an analogue of entropy.
Интересный факт: в 1912 году итальянский статистик и демограф Коррадо Джини написал знаменитый труд «Вариативность и изменчивость признака», и в этом же году «Титаник» затонул в водах Атлантики. Казалось бы, что общего между этими двумя событиями? Всё просто, их последствия нашли широкое применение в области машинного обучения. И если датасет...
I ran it on a sample, and it gives an error - I can't understand where to look for the error and how to fix it - maybe you know, since you use these libraries/packages?
R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()'for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()'for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()'for some demos, 'help()'for on-line help, or
'help.start()'for an HTML browser interface to help.
Type 'q()' to quit R.
[Workspace loaded from F:/FX/R/.RData]
Loading required package: Matrix
Error: package or namespace load failed for ‘Matrix’ in getClassDef(class1):
reached elapsed time limit
> source('F:/FX/R/Viborka_Korrelyaciya_v_02.R', echo=TRUE)
> library('caret')
Загрузка требуемого пакета: lattice
Загрузка требуемого пакета: ggplot2
> #way <- "F:\\FX\\Открытие Брокер_Demo\\MQL5\\Files\\Proboy_236_TP_4_SL_4\\Si\\Setup\\"
> #df1 = read.csv("F:\\FX\\Открытие Брокер_Demo\\MQL5\\Files\ ..." ... [TRUNCATED]
> df1 = read.csv("D:\\FX\\MT5_CB\\MQL5\\Files\\Po_Vektoru_TP_0_SL_0_G_2_Bi_v2\\EURUSD_0\\Setup\\train.csv", header = TRUE, sep = ";",dec = ".")
> cor.test.range <- seq(from = 0.1,to = 0.9,by = 0.1) # диапазон перебора в коеф корр
> get.findCorrelation <- function(data , not.used.colums , cor.coef){
+ library('caret')
+ df2 <- cor( data[, ! colnames(data) %in% not.use .... [TRUNCATED]
> for(i in1:length(cor.test.range)){
+
+ reduced_Data <- get.findCorrelation(data = df1 ,
+ not.used.co .... [TRUNCATED]
Warning messages:
1: пакет ‘caret’ был собран под R версии 4.1.02: пакет ‘ggplot2’ был собран под R версии 4.1.0
> source('F:/FX/R/Viborka_Korrelyaciya_v_02.R', echo=TRUE)
> library('caret')
> #way <- "F:\\FX\\Открытие Брокер_Demo\\MQL5\\Files\\Proboy_236_TP_4_SL_4\\Si\\Setup\\"
> #df1 = read.csv("F:\\FX\\Открытие Брокер_Demo\\MQL5\\Files\ ..." ... [TRUNCATED]
> df1 = read.csv("D:\\FX\\MT5_CB\\MQL5\\Files\\Po_Vektoru_TP_0_SL_0\\EURUSD_0\\Setup\\train.csv", header = TRUE, sep = ";",dec = ".")
> cor.test.range <- seq(from = 0.1,to = 0.9,by = 0.1) # диапазон перебора в коеф корр
> get.findCorrelation <- function(data , not.used.colums , cor.coef){
+ library('caret')
+ df2 <- cor( data[, ! colnames(data) %in% not.use .... [TRUNCATED]
> for(i in1:length(cor.test.range)){
+
+ reduced_Data <- get.findCorrelation(data = df1 ,
+ not.used.co .... [TRUNCATED]
Error in findCorrelation_fast(x = x, cutoff = cutoff, verbose = verbose) :
The correlation matrix has some missing values.
In addition: Warning message:
In cor(data[, !colnames(data) %in% not.used.colums]) :
стандартное отклонение нулевое
You once made a script that I decided to use again.
I ran it on a sample, and it gives an error - I can't understand where to find the error and how to fix it - maybe you know, since you use these libraries/packages?
Everything worked fine on a binary sample.
I don't use this library, I did it once, I think it was just for you.... You must have done something wrong in your new data if it works with the old data
mytarmailS #: I don't use this bibliotheca, I did it once, I think it was just for you.... You must have done something wrong with your new data if it works with the old data.
Yeah, for me. It works with binary, before I looked it was mostly running on binary. Too bad they don't tell you which column/row is wrong.
Yeah, for me. It works with binary, before I looked it was mostly running on binary. Too bad they don't tell you which column/row is wrong.
Double-check your data to make sure it matches the binary.
If you can't figure it out, send me a small piece of your data that the script doesn't work with, as well as the script itself and remind me what it should do.
mytarmailS #: Double-check your data to make sure it matches those binary....
If you can't figure it out, send me a small piece of your data that the script doesn't work with, as well as the script itself and remind me what it should do.
I'll try to help...
Why do they have to match the binary? I just said that the script works, but it doesn't work with all data.
I cut the sample and attached the script in a separate archive.
The script removes correlated columns from the sample and saves the new sample.
Columns are excluded depending on the correlation threshold.
You once made a script that I decided to use again.
I ran it on a sample, and it gives an error - I can't understand where to find the error and how to fix it - maybe you know, since you use these libraries/packages?
Everything worked fine on a binary sample.
The error says that undefined values(NA) have appeared in the correlation matrix and the findCorrelation function cannot use it. Open the package and read the function description.
The scripts are messy and a sea of unnecessary intermediate results. below is the corrected script
1. You don't need to load the "caret" package into the global scope. It is very heavy, pulling a lot of dependencies and data. You only need one function of it. You import it directly into the get.findCor function.
The tidyft package is a very fast dataframe manipulation package. Use it.
https://www.mql5.com/ru/blogs/post/723619
By the way, does anyone know how to calculate the root of the Gini index (I understand how to calculate the root, but the Gini index itself)? I'd prefer a code example. It would be interesting to experiment with it.
As I noted at the time "Giniindex and Gini coefficient are different things - don't confuse them".
For the G ini coefficient we use a GSC, i.e. we add noise. I have attached to the article the found code for calculating R and PY.
Index is something else.
By the way, does anyone know how to calculate the root of the Gini index (I understand how to calculate the root, but the Gini index itself)? I'd prefer an example of the code. It would be interesting to experiment with it.
As I noted at the time "Giniindex and Gini coefficient are different things - don't confuse them".
For the G ini coefficient we use a GSC, i.e. we add noise. I have attached to the article the found code for calculating R and PY.
Index is something else.
There is Gini coefficient and there is Gini Impurity. The first is used as a metric in binary classification, article. The second is used in decision trees as an analogue of entropy.
Once you made a script, which I decided to use again
I ran it on a sample, and it gives an error - I can't understand where to look for the error and how to fix it - maybe you know, since you use these libraries/packages?
Everything worked fine on a binary sample.
You once made a script that I decided to use again.
I ran it on a sample, and it gives an error - I can't understand where to find the error and how to fix it - maybe you know, since you use these libraries/packages?
Everything worked fine on a binary sample.
I don't use this bibliotheca, I did it once, I think it was just for you.... You must have done something wrong with your new data if it works with the old data.
Yeah, for me. It works with binary, before I looked it was mostly running on binary. Too bad they don't tell you which column/row is wrong.
Yeah, for me. It works with binary, before I looked it was mostly running on binary. Too bad they don't tell you which column/row is wrong.
Double-check your data to make sure it matches those binary....
Why do they have to match the binary? I just said that the script works, but it doesn't work with all data.
I cut the sample and attached the script in a separate archive.
The script removes correlated columns from the sample and saves the new sample.
Columns are excluded depending on the correlation threshold.
Why do they have to match the binary? I just said that the script works, but it doesn't work with all data.
Here you go, I had to rewrite it all over again, it was so shitty code that I didn't understand what it was doing
You once made a script that I decided to use again.
I ran it on a sample, and it gives an error - I can't understand where to find the error and how to fix it - maybe you know, since you use these libraries/packages?
Everything worked fine on a binary sample.
The error says that undefined values(NA) have appeared in the correlation matrix and the findCorrelation function cannot use it. Open the package and read the function description.
The scripts are messy and a sea of unnecessary intermediate results. below is the corrected script
Explanations in order:
1. You don't need to load the "caret" package into the global scope. It is very heavy, pulling a lot of dependencies and data. You only need one function of it. You import it directly into the get.findCor function.
The tidyft package is a very fast dataframe manipulation package. Use it.