nuevoojoooo

This commit is contained in:
Kubrik 2024-05-29 20:31:50 +02:00
parent b83d92ec7e
commit 7350cb5662
38 changed files with 417 additions and 708 deletions

Binary file not shown.

BIN
mae_perf_method.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -7,4 +7,3 @@
## ideas NAs
- usar los voluntarios con ceros como training
- probar todas las posibles combinaciones de retirar NAs en train

BIN
perf_metrics_summary.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

12
preguntas.py Normal file
View file

@ -0,0 +1,12 @@
import scrapy
class BlogSpider(scrapy.Spider):
name = 'blogspider'
start_urls = ['https://www.iata.csic.es/']
def parse(self, response):
for title in response.css('.oxy-post-title'):
yield {'title': title.css('::text').get()}
for next_page in response.css('a.next'):
yield response.follow(next_page, self.parse)

BIN
r2_perf_method.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,29 @@
;DHPAA.GG_urine_post_pred;DHPAA.GG_urine_post_test
135;0.028153156055213128;0.02306918427348137
66;0.018361467996007543;0.02124183
31;0.01845511186209114;0.011437908
118;0.050374303744972336;0.049019608
42;0.036810230067259544;0.02283056080341339
12;0.05219072017192368;0.06341682374477386
51;0.06314230449378826;0.081699346
68;0.032156267227236364;0.013071895
126;0.028153156055213128;0.03025123104453087
55;0.017200176868291738;0.022875817
112;0.028287330195368495;0.038646358996629715
130;0.06512786516866897;0.058823529
80;0.036769699793187775;0.02044045552611351
19;0.0646236779087797;0.091503268
86;0.06512786516866897;0.088235294
69;0.03409086651673512;0.016339869
11;0.031212544361196616;0.041303522884845734
27;0.036461300354839396;0.032679739
134;0.036810230067259544;0.031945351511240005
109;0.036038730903312076;0.050144873559474945
36;0.05406548222590799;0.021195339038968086
117;0.018320937721935774;0.011437908
78;0.04159588633530323;0.032308947294950485
4;0.027259469129501897;0.006535948
73;0.018320937721935774;0.019607843
26;0.06757869907213537;0.109477124
132;0.018320937721935774;0.004901961
60;0.03125307463526839;0.05469038337469101
1 DHPAA.GG_urine_post_pred DHPAA.GG_urine_post_test
2 135 0.028153156055213128 0.02306918427348137
3 66 0.018361467996007543 0.02124183
4 31 0.01845511186209114 0.011437908
5 118 0.050374303744972336 0.049019608
6 42 0.036810230067259544 0.02283056080341339
7 12 0.05219072017192368 0.06341682374477386
8 51 0.06314230449378826 0.081699346
9 68 0.032156267227236364 0.013071895
10 126 0.028153156055213128 0.03025123104453087
11 55 0.017200176868291738 0.022875817
12 112 0.028287330195368495 0.038646358996629715
13 130 0.06512786516866897 0.058823529
14 80 0.036769699793187775 0.02044045552611351
15 19 0.0646236779087797 0.091503268
16 86 0.06512786516866897 0.088235294
17 69 0.03409086651673512 0.016339869
18 11 0.031212544361196616 0.041303522884845734
19 27 0.036461300354839396 0.032679739
20 134 0.036810230067259544 0.031945351511240005
21 109 0.036038730903312076 0.050144873559474945
22 36 0.05406548222590799 0.021195339038968086
23 117 0.018320937721935774 0.011437908
24 78 0.04159588633530323 0.032308947294950485
25 4 0.027259469129501897 0.006535948
26 73 0.018320937721935774 0.019607843
27 26 0.06757869907213537 0.109477124
28 132 0.018320937721935774 0.004901961
29 60 0.03125307463526839 0.05469038337469101

View file

@ -0,0 +1,29 @@
;VA.S_post_pred;VA.S_post_test
135;0.3856540425219162;0.39814651012420654
66;0.1820317685516569;0.179540709812109
31;0.09500056013237226;0.103340292275574
118;0.4109125647914376;0.536534446764092
42;0.3856540425219162;0.39814651012420654
12;0.18261806302989889;0.177800974251914
51;0.10268324709709578;0.0723729993041058
68;0.1796872094731296;0.17571329157968
126;0.4477433077604814;1.0
55;0.14072484000067353;0.159011830201809
112;0.29733352042822303;0.283228949199722
130;0.15674750982777283;0.0949895615866388
80;0.28089946791987636;0.251913709116214
19;0.30881229269932087;0.282533054975644
86;0.26250097642533193;0.14294157922267914
69;0.2070460948787779;0.211899791231733
11;0.17120079373894959;0.178844815588031
27;0.1924398089521744;0.17223382045929
134;0.3856540425219162;0.39814651012420654
109;0.24717340450649433;0.224425887265136
36;0.3498188867479469;0.331593597773139
117;0.15631651482067102;0.156576200417537
78;0.40182931980868064;0.616910229645094
4;0.3112146833258589;0.279053583855254
73;0.142318495823758;0.157620041753653
26;0.19001386932573935;0.203201113430759
132;0.3723563099639571;0.26920539140701294
60;0.3845162666647124;0.532707028531663
1 VA.S_post_pred VA.S_post_test
2 135 0.3856540425219162 0.39814651012420654
3 66 0.1820317685516569 0.179540709812109
4 31 0.09500056013237226 0.103340292275574
5 118 0.4109125647914376 0.536534446764092
6 42 0.3856540425219162 0.39814651012420654
7 12 0.18261806302989889 0.177800974251914
8 51 0.10268324709709578 0.0723729993041058
9 68 0.1796872094731296 0.17571329157968
10 126 0.4477433077604814 1.0
11 55 0.14072484000067353 0.159011830201809
12 112 0.29733352042822303 0.283228949199722
13 130 0.15674750982777283 0.0949895615866388
14 80 0.28089946791987636 0.251913709116214
15 19 0.30881229269932087 0.282533054975644
16 86 0.26250097642533193 0.14294157922267914
17 69 0.2070460948787779 0.211899791231733
18 11 0.17120079373894959 0.178844815588031
19 27 0.1924398089521744 0.17223382045929
20 134 0.3856540425219162 0.39814651012420654
21 109 0.24717340450649433 0.224425887265136
22 36 0.3498188867479469 0.331593597773139
23 117 0.15631651482067102 0.156576200417537
24 78 0.40182931980868064 0.616910229645094
25 4 0.3112146833258589 0.279053583855254
26 73 0.142318495823758 0.157620041753653
27 26 0.19001386932573935 0.203201113430759
28 132 0.3723563099639571 0.26920539140701294
29 60 0.3845162666647124 0.532707028531663

View file

@ -0,0 +1,29 @@
;DHPAA.GG_urine_post_pred;DHPAA.GG_urine_post_test
135;0.031273110190910364;0.02306918427348137
66;0.03145485430803648;0.02124183
31;0.01765842710094761;0.011437908
118;0.04195940158403984;0.049019608
42;0.03142314200243451;0.02283056080341339
12;0.0377685457829103;0.06341682374477386
51;0.07098040480298232;0.081699346
68;0.020870417506442494;0.013071895
126;0.03283576057480141;0.03025123104453087
55;0.022325100615161547;0.022875817
112;0.03705067103943467;0.038646358996629715
130;0.04507897043507233;0.058823529
80;0.029334536335621445;0.02044045552611351
19;0.07895820794032689;0.091503268
86;0.07592136790440752;0.088235294
69;0.05038106270314998;0.016339869
11;0.0364069806867011;0.041303522884845734
27;0.042261517999367705;0.032679739
134;0.04181352141882766;0.031945351511240005
109;0.029714568217147713;0.050144873559474945
36;0.03668268442589102;0.021195339038968086
117;0.024357621131988083;0.011437908
78;0.04948888001872687;0.032308947294950485
4;0.02368186276767989;0.006535948
73;0.018124506751902702;0.019607843
26;0.08721752947338282;0.109477124
132;0.014476640958512664;0.004901961
60;0.027154709682683038;0.05469038337469101
1 DHPAA.GG_urine_post_pred DHPAA.GG_urine_post_test
2 135 0.031273110190910364 0.02306918427348137
3 66 0.03145485430803648 0.02124183
4 31 0.01765842710094761 0.011437908
5 118 0.04195940158403984 0.049019608
6 42 0.03142314200243451 0.02283056080341339
7 12 0.0377685457829103 0.06341682374477386
8 51 0.07098040480298232 0.081699346
9 68 0.020870417506442494 0.013071895
10 126 0.03283576057480141 0.03025123104453087
11 55 0.022325100615161547 0.022875817
12 112 0.03705067103943467 0.038646358996629715
13 130 0.04507897043507233 0.058823529
14 80 0.029334536335621445 0.02044045552611351
15 19 0.07895820794032689 0.091503268
16 86 0.07592136790440752 0.088235294
17 69 0.05038106270314998 0.016339869
18 11 0.0364069806867011 0.041303522884845734
19 27 0.042261517999367705 0.032679739
20 134 0.04181352141882766 0.031945351511240005
21 109 0.029714568217147713 0.050144873559474945
22 36 0.03668268442589102 0.021195339038968086
23 117 0.024357621131988083 0.011437908
24 78 0.04948888001872687 0.032308947294950485
25 4 0.02368186276767989 0.006535948
26 73 0.018124506751902702 0.019607843
27 26 0.08721752947338282 0.109477124
28 132 0.014476640958512664 0.004901961
29 60 0.027154709682683038 0.05469038337469101

View file

@ -0,0 +1,29 @@
;VA.S_post_pred;VA.S_post_test
135;0.3777733238510637;0.39814651012420654
66;0.2295859566079087;0.179540709812109
31;0.17085845085143272;0.103340292275574
118;0.47819910002193927;0.536534446764092
42;0.3920482403870007;0.39814651012420654
12;0.18721629507048224;0.177800974251914
51;0.14784595676779108;0.0723729993041058
68;0.20366391781796678;0.17571329157968
126;0.4627053571344643;1.0
55;0.15880194207735832;0.159011830201809
112;0.2782131437541021;0.283228949199722
130;0.30317636237545054;0.0949895615866388
80;0.289299486043098;0.251913709116214
19;0.2407923468256168;0.282533054975644
86;0.23815393602134982;0.14294157922267914
69;0.2014224425325397;0.211899791231733
11;0.21277665207793675;0.178844815588031
27;0.2029479530718343;0.17223382045929
134;0.3777733238510637;0.39814651012420654
109;0.3156291944544935;0.224425887265136
36;0.30806962701332347;0.331593597773139
117;0.20823083572217962;0.156576200417537
78;0.3983591457155721;0.616910229645094
4;0.24678185142233666;0.279053583855254
73;0.19202459194875676;0.157620041753653
26;0.2262721234028612;0.203201113430759
132;0.31789609961575716;0.26920539140701294
60;0.39152947533099897;0.532707028531663
1 VA.S_post_pred VA.S_post_test
2 135 0.3777733238510637 0.39814651012420654
3 66 0.2295859566079087 0.179540709812109
4 31 0.17085845085143272 0.103340292275574
5 118 0.47819910002193927 0.536534446764092
6 42 0.3920482403870007 0.39814651012420654
7 12 0.18721629507048224 0.177800974251914
8 51 0.14784595676779108 0.0723729993041058
9 68 0.20366391781796678 0.17571329157968
10 126 0.4627053571344643 1.0
11 55 0.15880194207735832 0.159011830201809
12 112 0.2782131437541021 0.283228949199722
13 130 0.30317636237545054 0.0949895615866388
14 80 0.289299486043098 0.251913709116214
15 19 0.2407923468256168 0.282533054975644
16 86 0.23815393602134982 0.14294157922267914
17 69 0.2014224425325397 0.211899791231733
18 11 0.21277665207793675 0.178844815588031
19 27 0.2029479530718343 0.17223382045929
20 134 0.3777733238510637 0.39814651012420654
21 109 0.3156291944544935 0.224425887265136
22 36 0.30806962701332347 0.331593597773139
23 117 0.20823083572217962 0.156576200417537
24 78 0.3983591457155721 0.616910229645094
25 4 0.24678185142233666 0.279053583855254
26 73 0.19202459194875676 0.157620041753653
27 26 0.2262721234028612 0.203201113430759
28 132 0.31789609961575716 0.26920539140701294
29 60 0.39152947533099897 0.532707028531663

View file

@ -0,0 +1,29 @@
;DHPAA.GG_urine_post_pred;DHPAA.GG_urine_post_test
135;0.031462133;0.02306918427348137
66;0.02905063;0.02124183
31;0.017424105;0.011437908
118;0.04723146;0.049019608
42;0.027945299;0.02283056080341339
12;0.041838914;0.06341682374477386
51;0.07040258;0.081699346
68;0.029148411;0.013071895
126;0.034234293;0.03025123104453087
55;0.020864855;0.022875817
112;0.04168502;0.038646358996629715
130;0.04384079;0.058823529
80;0.025912791;0.02044045552611351
19;0.07090839;0.091503268
86;0.07661374;0.088235294
69;0.043188192;0.016339869
11;0.021142017;0.041303522884845734
27;0.049644094;0.032679739
134;0.043581855;0.031945351511240005
109;0.02959964;0.050144873559474945
36;0.042403404;0.021195339038968086
117;0.020200256;0.011437908
78;0.04311989;0.032308947294950485
4;0.028928952;0.006535948
73;0.015874023;0.019607843
26;0.08626201;0.109477124
132;0.013017364;0.004901961
60;0.020769069;0.05469038337469101
1 DHPAA.GG_urine_post_pred DHPAA.GG_urine_post_test
2 135 0.031462133 0.02306918427348137
3 66 0.02905063 0.02124183
4 31 0.017424105 0.011437908
5 118 0.04723146 0.049019608
6 42 0.027945299 0.02283056080341339
7 12 0.041838914 0.06341682374477386
8 51 0.07040258 0.081699346
9 68 0.029148411 0.013071895
10 126 0.034234293 0.03025123104453087
11 55 0.020864855 0.022875817
12 112 0.04168502 0.038646358996629715
13 130 0.04384079 0.058823529
14 80 0.025912791 0.02044045552611351
15 19 0.07090839 0.091503268
16 86 0.07661374 0.088235294
17 69 0.043188192 0.016339869
18 11 0.021142017 0.041303522884845734
19 27 0.049644094 0.032679739
20 134 0.043581855 0.031945351511240005
21 109 0.02959964 0.050144873559474945
22 36 0.042403404 0.021195339038968086
23 117 0.020200256 0.011437908
24 78 0.04311989 0.032308947294950485
25 4 0.028928952 0.006535948
26 73 0.015874023 0.019607843
27 26 0.08626201 0.109477124
28 132 0.013017364 0.004901961
29 60 0.020769069 0.05469038337469101

View file

@ -0,0 +1,29 @@
;VA.S_post_pred;VA.S_post_test
135;0.39736453;0.39814651012420654
66;0.17058298;0.179540709812109
31;0.08955078;0.103340292275574
118;0.48255712;0.536534446764092
42;0.3974191;0.39814651012420654
12;0.17535107;0.177800974251914
51;0.082894;0.0723729993041058
68;0.21463375;0.17571329157968
126;0.5112201;1.0
55;0.15372284;0.159011830201809
112;0.26576737;0.283228949199722
130;0.12122539;0.0949895615866388
80;0.23488523;0.251913709116214
19;0.28017506;0.282533054975644
86;0.18157113;0.14294157922267914
69;0.2018286;0.211899791231733
11;0.17589235;0.178844815588031
27;0.1840144;0.17223382045929
134;0.39736453;0.39814651012420654
109;0.2519063;0.224425887265136
36;0.31645885;0.331593597773139
117;0.16063862;0.156576200417537
78;0.5179117;0.616910229645094
4;0.21262856;0.279053583855254
73;0.15488961;0.157620041753653
26;0.22001734;0.203201113430759
132;0.24209619;0.26920539140701294
60;0.65157264;0.532707028531663
1 VA.S_post_pred VA.S_post_test
2 135 0.39736453 0.39814651012420654
3 66 0.17058298 0.179540709812109
4 31 0.08955078 0.103340292275574
5 118 0.48255712 0.536534446764092
6 42 0.3974191 0.39814651012420654
7 12 0.17535107 0.177800974251914
8 51 0.082894 0.0723729993041058
9 68 0.21463375 0.17571329157968
10 126 0.5112201 1.0
11 55 0.15372284 0.159011830201809
12 112 0.26576737 0.283228949199722
13 130 0.12122539 0.0949895615866388
14 80 0.23488523 0.251913709116214
15 19 0.28017506 0.282533054975644
16 86 0.18157113 0.14294157922267914
17 69 0.2018286 0.211899791231733
18 11 0.17589235 0.178844815588031
19 27 0.1840144 0.17223382045929
20 134 0.39736453 0.39814651012420654
21 109 0.2519063 0.224425887265136
22 36 0.31645885 0.331593597773139
23 117 0.16063862 0.156576200417537
24 78 0.5179117 0.616910229645094
25 4 0.21262856 0.279053583855254
26 73 0.15488961 0.157620041753653
27 26 0.22001734 0.203201113430759
28 132 0.24209619 0.26920539140701294
29 60 0.65157264 0.532707028531663

View file

@ -0,0 +1,8 @@
index;Value
target;DHPAA.GG_urine_post
method;lgbm_DHPAA.GG_urine_post
r2;0.6321800511692435
mae;0.01322630609274777
mse;0.0002716411701154974
mape;0.5937794803254899
ev;0.6324661040098283
1 index Value
2 target DHPAA.GG_urine_post
3 method lgbm_DHPAA.GG_urine_post
4 r2 0.6321800511692435
5 mae 0.01322630609274777
6 mse 0.0002716411701154974
7 mape 0.5937794803254899
8 ev 0.6324661040098283

View file

@ -0,0 +1,8 @@
index;Value
target;DHPAA.GG_urine_post
method;rf_DHPAA.GG_urine_post
r2;0.7153104415478325
mae;0.01211031209267511
mse;0.00021024798960317991
mape;0.5389835080915979
ev;0.7158407698133342
1 index Value
2 target DHPAA.GG_urine_post
3 method rf_DHPAA.GG_urine_post
4 r2 0.7153104415478325
5 mae 0.01211031209267511
6 mse 0.00021024798960317991
7 mape 0.5389835080915979
8 ev 0.7158407698133342

View file

@ -0,0 +1,8 @@
index;Value
target;DHPAA.GG_urine_post
method;xgb_DHPAA.GG_urine_post
r2;0.672220639822841
mae;0.01314507662885431
mse;0.0002420705272274436
mape;0.5725399904527851
ev;0.6722345480353836
1 index Value
2 target DHPAA.GG_urine_post
3 method xgb_DHPAA.GG_urine_post
4 r2 0.672220639822841
5 mae 0.01314507662885431
6 mse 0.0002420705272274436
7 mape 0.5725399904527851
8 ev 0.6722345480353836

View file

@ -0,0 +1,8 @@
index;Value
target;VA.S_post
method;lgbm_VA.S_post
r2;0.5942984537720181
mae;0.05840252157288433
mse;0.01514590421303627
mape;0.17611546600375563
ev;0.6090790308599667
1 index Value
2 target VA.S_post
3 method lgbm_VA.S_post
4 r2 0.5942984537720181
5 mae 0.05840252157288433
6 mse 0.01514590421303627
7 mape 0.17611546600375563
8 ev 0.6090790308599667

View file

@ -0,0 +1,8 @@
index;Value
target;VA.S_post
method;rf_VA.S_post
r2;0.5707264348940158
mae;0.07143929096472698
mse;0.01602590958485085
mape;0.30699726553302753
ev;0.5725430320175894
1 index Value
2 target VA.S_post
3 method rf_VA.S_post
4 r2 0.5707264348940158
5 mae 0.07143929096472698
6 mse 0.01602590958485085
7 mape 0.30699726553302753
8 ev 0.5725430320175894

View file

@ -0,0 +1,8 @@
index;Value
target;VA.S_post
method;xgb_VA.S_post
r2;0.734865384893162
mae;0.040325589676149964
mse;0.009898171503915842
mape;0.1080470427189779
ev;0.7449203977422081
1 index Value
2 target VA.S_post
3 method xgb_VA.S_post
4 r2 0.734865384893162
5 mae 0.040325589676149964
6 mse 0.009898171503915842
7 mape 0.1080470427189779
8 ev 0.7449203977422081

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View file

@ -117,8 +117,6 @@ anthropometric_features = ["Weight_pre","Weight_post","Delta_Weight",
"Bpmin_pre", "Bpmax_pre","Frec_post","Frec_pre"]
#main_df[anthropometric_features] = main_df[anthropometric_features].apply(pd.to_numeric)
study_features = ["Sex", "Sweetener"]
urine_ant_features = ['CA_urine_pre', 'CA.G_urine_pre', 'CA.S_urine_pre',
@ -159,16 +157,29 @@ plasm_ant_features = ['CA_plasm_pre', 'CA.G_plasm_pre', 'CA.S_plasm_pre', 'To
'Total.VA_plasm_post']
# Total VA, Total DHPAA, DHPAA_plasm -> Ok
# VA_plasm -> =(
directory = "../results/customStudy/custom_Ind"
# Faltan VA.S, DHPAA.SS_plasm, DHPAA.GG_urine
targets = ['E.S_urine_post','Total.E_urine_post']
features = ['E_urine_pre', 'E.S_urine_pre', 'EG.1_pre', 'Total.E_urine_pre']
# VA.S
directory = "../results/customStudy/custom_Ind/specialCases"
print(" ----------------- STARTING "+ directory + "----------------- ")
if not os.path.exists(directory):
os.mkdir(directory)
targets = ['VA.S_post']
features = ['VA_plasm_pre','VA.GG_plasm_pre', 'VA.S_pre', 'VA.GS_plasm_pre', 'VA.SS_plasm_pre','Total.VA_plasm_pre'] + study_features
exec_models(main_df, features=features, targets=targets, multiple=False, directory=directory+"/")
targets = ['DHPAA.GG_urine_post']
features = ['DHPAA_urine_pre', 'DHPAA.G_urine_pre', 'DHPAA.GG_urine_pre', 'DHPAA.GS_urine_pre', 'DHPAA.SS_urine_pre', 'Total.DHPAA_urine_pre'] + study_features
exec_models(main_df, features=features, targets=targets, multiple=False, directory=directory+"/")
custom_Ind_Study = False
if custom_Ind_Study:
directory = "../results/customStudy/custom_Ind"
# TFA Family
print(" ----------------- STARTING "+ directory + "----------------- ")
@ -190,7 +201,6 @@ if custom_Ind_Study:
'Total.VA_plasm_pre'] + study_features
exec_models(main_df, features=features, targets=targets, multiple=False, directory=directory+"/")
# DHPAA Family
print(" ----------------- STARTING "+ directory + "----------------- ")
@ -219,7 +229,9 @@ if custom_Ind_Study:
exec_models(main_df, features=features, targets=targets, multiple=False, directory=directory+"/")
targets = ['E.S_urine_post','Total.E_urine_post']
features = ['E_urine_pre', 'E.S_urine_pre', 'EG.1_pre', 'Total.E_urine_pre']
exec_models(main_df, features=features, targets=targets, multiple=False, directory=directory+"/")
multipleStudy = False
@ -281,7 +293,7 @@ if multipleStudy:
os.mkdir("../results/multiple_targets/HomoeriodyctiolFamily")
exec_models(main_df, features=features, targets=targets, multiple=True, directory="../results/multiple_targets/HomoeriodyctiolFamily/")
customStudy = True
customStudy = False
if customStudy:

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@ import pandas as pd
import numpy as np
from sklearn.model_selection import RepeatedKFold, cross_val_score
from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error, mean_absolute_percentage_error, explained_variance_score
import re
def scoringMulti(model, X_test, y_test):
scores = []
@ -51,7 +51,7 @@ def modelMetrics (target, method, y_true, y_pred, multiple = False):
result_metrics_list.append(result_metrics)
result_metrics = pd.DataFrame.from_dict(result_metrics_list)
else:
r2 = r2_score(y_true, y_pred)
r2 = r2_score(y_true, y_pred, )
mae = mean_absolute_error(y_true, y_pred)
mse = mean_squared_error(y_true, y_pred)
mape = mean_absolute_percentage_error(y_true, y_pred)

View file

@ -6,3 +6,4 @@ Problema: desbalanceo de resultados debido a muchos ceros en algunas variables
Posibles soluciones:
Hay que ver si hay implementación de MLP que maneje NAs