new results

This commit is contained in:
He Zhou 2023-02-13 08:26:27 +08:00
parent f11e771218
commit e919dad2b3
10 changed files with 31 additions and 30 deletions

View File

@ -56,6 +56,7 @@ def anova(lst_col_seg, n_level, oa_file, result_file):
arr_f = df_s_non_error / ms_of_error
do_print(arr_f.values.tolist()[0], f'{str_ind_name}\tF ratio')
# alpha = 0.05
alpha = 0.1
arr_p_value = f.sf(arr_f, n_level - 1, n_degree_error)
do_print(arr_p_value.tolist()[0], f'{str_ind_name}\tP value')
@ -71,7 +72,7 @@ def anova(lst_col_seg, n_level, oa_file, result_file):
if __name__ == '__main__':
# first test
the_lst_col_seg = [5, 1, 5] # 11 factors, 2 for error, and 6 indicators
the_lst_col_seg = [5, 1, 6] # 11 factors, 2 for error, and 6 indicators
the_n_level = 5
anova(the_lst_col_seg, the_n_level, "oa25.txt", "result/experiment_result_25.xlsx")

View File

@ -2,12 +2,12 @@ import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
num_time_step = 200
num_time_step = 201
num_iter = 10
env_data = pd.DataFrame(pd.read_excel('env_data.xlsx', engine='openpyxl', sheet_name=0))
assert env_data.shape[0] == num_iter * (num_time_step + 1)
assert env_data.shape[0] == num_iter * (num_time_step + 1), f"{env_data.shape[0]}, {num_iter * (num_time_step + 1)}"
lst_df = []
for i in range(num_iter):

View File

@ -4,7 +4,7 @@ from env import Env
import datetime
idx_start = 10 # first index is 1 !
idx_start = 1 # first index is 1 !
n_sample = 30

Binary file not shown.

BIN
out_f_avg_yield.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,26 +1,26 @@
,alpha,percent_search,is_RH_ratio,is_FH_ratio,4,5,out_w_avg_salary,out_w_gini_salary,out_f_avg_profit,out_f_gini_profit,out_w_percent_hired
0,0.3,0.8,0.75,0.5,0,0,3264853080.7861195,0.07448611065757892,27068180827.948566,0.028471074467998493,0.9926999999999998
1,0.5,0.1,0.5,0.5,3,4,3637864305.7383804,0.07297697986009385,30978395677.329544,0.025035570583021458,0.9932
2,0.5,0.2,1.0,0.75,4,1,2179839879.06716,0.09840417843256091,14870250970.957703,0.09615406368119288,0.9886333333333329
3,0.5,0.3,0.75,0.25,1,2,3294909225.056388,0.07458035794885493,27529372104.086937,0.027549550048933245,0.9904999999999996
4,0.5,0.6,0.25,0.0,2,3,3716906250.022679,0.08529021609092702,30937889107.04533,0.025723945674350865,0.9942999999999997
5,0.5,0.8,0.0,1.0,1,1,3869912345.136378,0.09546657392456424,32080217202.03705,0.02533111889073941,1.0
6,0.7,0.1,0.75,0.75,0,3,3323780234.219529,0.07324360974831064,27481709495.610508,0.02827211821311022,0.9934666666666666
7,0.7,0.2,0.0,0.25,3,2,3890360391.8347297,0.09312614979722612,32025419370.64081,0.027331743681722087,0.9998666666666668
8,0.7,0.3,0.25,1.0,2,4,3724730633.529055,0.08585608644546336,30966818797.24322,0.02556013680036385,0.9997333333333333
9,0.7,0.6,1.0,0.5,4,0,2059080141.3863091,0.13011386291850205,11919309572.784859,0.17383571880300247,0.9850999999999996
10,0.7,0.8,0.5,0.0,2,2,3558046321.01991,0.07852769877145456,29326434059.91672,0.02645991757420794,0.9920333333333334
11,0.9,0.1,1.0,1.0,1,0,2217056469.2871513,0.09085566892663295,14019663732.042246,0.10640474650259805,0.9943333333333331
12,0.9,0.2,0.75,0.0,0,4,3288880578.2219296,0.07786092688764147,27583988860.902683,0.028509652392809604,0.9885666666666665
13,0.9,0.3,0.0,0.5,4,3,3879623567.573062,0.09407352725749332,32151544223.643482,0.026003986467554037,0.9999666666666667
14,0.9,0.6,0.5,0.25,3,1,3577219455.771972,0.0785081831642713,29903884548.088444,0.02491509062583037,0.9924
15,0.9,0.8,0.25,0.75,3,3,3710277766.924487,0.08632310052044662,30554824167.139378,0.026183286845803396,0.9967333333333335
16,,,,,4,2,,,,,
17,,,,,2,0,,,,,
18,,,,,0,1,,,,,
19,,,,,1,4,,,,,
20,,,,,4,4,,,,,
21,,,,,2,1,,,,,
22,,,,,1,3,,,,,
23,,,,,3,0,,,,,
24,,,,,0,2,,,,,
,alpha,percent_search,is_RH_ratio,is_FH_ratio,4,5,out_w_avg_salary,out_w_gini_salary,out_f_avg_profit,out_f_avg_yield,out_f_gini_profit,out_w_percent_hired
0,0.1,0.1,0.0,0.0,0,0,3964054687.4268475,0.08720663778245505,32888833432.274235,0.7063055988364291,0.02573588115431101,0.9999666666666668
1,0.1,0.2,0.25,0.5,3,4,3771613705.088724,0.07954486986586938,31868416681.904884,0.7486264770120516,0.024921222378351093,0.9960666666666663
2,0.1,0.3,0.5,0.75,4,1,3584820695.7431035,0.07319267750272562,30385929071.529438,0.7768847955950473,0.024373996254554064,0.9958666666666665
3,0.1,0.6,0.75,1.0,1,2,3408013297.120691,0.08699814562875076,27485267714.345665,0.7779103018269108,0.04309196337844635,0.9709000000000001
4,0.1,0.8,1.0,0.25,2,3,2540634743.6358457,0.05369244039646588,19646121099.463802,0.7791622239510231,0.041099371568935936,0.9961666666666666
5,0.3,0.1,0.25,0.25,1,1,3822529021.562453,0.0761493282211473,32764211314.472507,0.73924191031523,0.02429009889320572,0.9944666666666666
6,0.3,0.2,0.5,1.0,0,3,3607254045.656348,0.07610097626526957,30641750291.150898,0.7749833336482536,0.023537073789590485,0.9998333333333334
7,0.3,0.3,1.0,0.0,3,2,2326166598.3574433,0.07193946514093447,17174550354.996449,0.7498407860386497,0.056183971569819934,0.9906666666666665
8,0.3,0.6,0.0,0.75,2,4,3866291501.614393,0.09685969668328769,30553633014.9875,0.706168605244585,0.02919183959836508,0.9999666666666668
9,0.3,0.8,0.75,0.5,4,0,3302765119.010196,0.08739879310155402,28973869596.09232,0.7727757803240185,0.03792936672857634,0.9674666666666665
10,0.5,0.1,0.5,0.5,2,2,3635164347.9166718,0.07223238071369359,29826975750.47325,0.7640343077593824,0.025579797905849556,0.9932666666666666
11,0.5,0.2,1.0,0.75,1,0,2145814519.6934304,0.10630648602237686,15121756598.665697,0.7429493087241388,0.10024898712596307,0.9883333333333331
12,0.5,0.3,0.75,0.25,0,4,3280215776.8779473,0.07392344601920621,27535874923.18503,0.7742386824858348,0.02778184966327841,0.9903666666666666
13,0.5,0.6,0.25,0.0,4,3,3733053371.543826,0.08542184529182892,30294457718.652958,0.739994385787595,0.026143624669807606,0.9939666666666667
14,0.5,0.8,0.0,1.0,3,1,3868081665.235581,0.09524632405793981,31123061915.61634,0.70811665076265,0.028232860276024917,1.0
15,0.7,0.1,0.75,0.75,3,3,3330590377.077554,0.07324286087806994,28009354984.178905,0.77101870101639,0.026522250255100542,0.9938333333333332
16,0.7,0.2,0.0,0.25,4,2,3879923892.405111,0.09287772214905302,32077456261.107548,0.7092648986079924,0.026124849236665932,0.9997666666666666
17,0.7,0.3,0.25,1.0,2,0,3729559649.969672,0.08472110828756059,30574439942.61938,0.7366900948997877,0.025480143774951766,0.9997333333333331
18,0.7,0.6,1.0,0.5,0,1,2019860002.646692,0.14496429252217075,12716899877.15417,0.754715476782345,0.16283168991147254,0.9836666666666667
19,0.7,0.8,0.5,0.0,1,4,3568806095.650769,0.07871915191895583,30032167448.892323,0.7629522316567776,0.025065573066454436,0.9920666666666663
20,0.9,0.1,1.0,1.0,4,4,2246819785.3982553,0.08289906596938025,16391553824.467003,0.7373396218956161,0.07195343604986927,0.9945999999999997
21,0.9,0.2,0.75,0.0,2,1,3330876703.8792706,0.07610629773949494,27674320366.79667,0.7742527429660275,0.028118070033153513,0.9895999999999999
22,0.9,0.3,0.0,0.5,1,3,3880659664.8644805,0.0940375231764736,31799708717.90585,0.701975186568906,0.02633369365903764,0.9999333333333333
23,0.9,0.6,0.5,0.25,3,0,3572889817.877089,0.0792317259747448,28817388267.385258,0.7624308348187311,0.027316029066635297,0.9926333333333331
24,0.9,0.8,0.25,0.75,0,2,3702065223.334019,0.08670772960451446,30971934313.33295,0.7391414945664546,0.02459908627439125,0.9962999999999997

1 alpha percent_search is_RH_ratio is_FH_ratio 4 5 out_w_avg_salary out_w_gini_salary out_f_avg_profit out_f_avg_yield out_f_gini_profit out_w_percent_hired
2 0 0.3 0.1 0.8 0.1 0.75 0.0 0.5 0.0 0 0 3264853080.7861195 3964054687.4268475 0.07448611065757892 0.08720663778245505 27068180827.948566 32888833432.274235 0.7063055988364291 0.028471074467998493 0.02573588115431101 0.9926999999999998 0.9999666666666668
3 1 0.5 0.1 0.1 0.2 0.5 0.25 0.5 3 4 3637864305.7383804 3771613705.088724 0.07297697986009385 0.07954486986586938 30978395677.329544 31868416681.904884 0.7486264770120516 0.025035570583021458 0.024921222378351093 0.9932 0.9960666666666663
4 2 0.5 0.1 0.2 0.3 1.0 0.5 0.75 4 1 2179839879.06716 3584820695.7431035 0.09840417843256091 0.07319267750272562 14870250970.957703 30385929071.529438 0.7768847955950473 0.09615406368119288 0.024373996254554064 0.9886333333333329 0.9958666666666665
5 3 0.5 0.1 0.3 0.6 0.75 0.25 1.0 1 2 3294909225.056388 3408013297.120691 0.07458035794885493 0.08699814562875076 27529372104.086937 27485267714.345665 0.7779103018269108 0.027549550048933245 0.04309196337844635 0.9904999999999996 0.9709000000000001
6 4 0.5 0.1 0.6 0.8 0.25 1.0 0.0 0.25 2 3 3716906250.022679 2540634743.6358457 0.08529021609092702 0.05369244039646588 30937889107.04533 19646121099.463802 0.7791622239510231 0.025723945674350865 0.041099371568935936 0.9942999999999997 0.9961666666666666
7 5 0.5 0.3 0.8 0.1 0.0 0.25 1.0 0.25 1 1 3869912345.136378 3822529021.562453 0.09546657392456424 0.0761493282211473 32080217202.03705 32764211314.472507 0.73924191031523 0.02533111889073941 0.02429009889320572 1.0 0.9944666666666666
8 6 0.7 0.3 0.1 0.2 0.75 0.5 0.75 1.0 0 3 3323780234.219529 3607254045.656348 0.07324360974831064 0.07610097626526957 27481709495.610508 30641750291.150898 0.7749833336482536 0.02827211821311022 0.023537073789590485 0.9934666666666666 0.9998333333333334
9 7 0.7 0.3 0.2 0.3 0.0 1.0 0.25 0.0 3 2 3890360391.8347297 2326166598.3574433 0.09312614979722612 0.07193946514093447 32025419370.64081 17174550354.996449 0.7498407860386497 0.027331743681722087 0.056183971569819934 0.9998666666666668 0.9906666666666665
10 8 0.7 0.3 0.3 0.6 0.25 0.0 1.0 0.75 2 4 3724730633.529055 3866291501.614393 0.08585608644546336 0.09685969668328769 30966818797.24322 30553633014.9875 0.706168605244585 0.02556013680036385 0.02919183959836508 0.9997333333333333 0.9999666666666668
11 9 0.7 0.3 0.6 0.8 1.0 0.75 0.5 4 0 2059080141.3863091 3302765119.010196 0.13011386291850205 0.08739879310155402 11919309572.784859 28973869596.09232 0.7727757803240185 0.17383571880300247 0.03792936672857634 0.9850999999999996 0.9674666666666665
12 10 0.7 0.5 0.8 0.1 0.5 0.0 0.5 2 2 3558046321.01991 3635164347.9166718 0.07852769877145456 0.07223238071369359 29326434059.91672 29826975750.47325 0.7640343077593824 0.02645991757420794 0.025579797905849556 0.9920333333333334 0.9932666666666666
13 11 0.9 0.5 0.1 0.2 1.0 1.0 0.75 1 0 2217056469.2871513 2145814519.6934304 0.09085566892663295 0.10630648602237686 14019663732.042246 15121756598.665697 0.7429493087241388 0.10640474650259805 0.10024898712596307 0.9943333333333331 0.9883333333333331
14 12 0.9 0.5 0.2 0.3 0.75 0.0 0.25 0 4 3288880578.2219296 3280215776.8779473 0.07786092688764147 0.07392344601920621 27583988860.902683 27535874923.18503 0.7742386824858348 0.028509652392809604 0.02778184966327841 0.9885666666666665 0.9903666666666666
15 13 0.9 0.5 0.3 0.6 0.0 0.25 0.5 0.0 4 3 3879623567.573062 3733053371.543826 0.09407352725749332 0.08542184529182892 32151544223.643482 30294457718.652958 0.739994385787595 0.026003986467554037 0.026143624669807606 0.9999666666666667 0.9939666666666667
16 14 0.9 0.5 0.6 0.8 0.5 0.0 0.25 1.0 3 1 3577219455.771972 3868081665.235581 0.0785081831642713 0.09524632405793981 29903884548.088444 31123061915.61634 0.70811665076265 0.02491509062583037 0.028232860276024917 0.9924 1.0
17 15 0.9 0.7 0.8 0.1 0.25 0.75 0.75 3 3 3710277766.924487 3330590377.077554 0.08632310052044662 0.07324286087806994 30554824167.139378 28009354984.178905 0.77101870101639 0.026183286845803396 0.026522250255100542 0.9967333333333335 0.9938333333333332
18 16 0.7 0.2 0.0 0.25 4 2 3879923892.405111 0.09287772214905302 32077456261.107548 0.7092648986079924 0.026124849236665932 0.9997666666666666
19 17 0.7 0.3 0.25 1.0 2 0 3729559649.969672 0.08472110828756059 30574439942.61938 0.7366900948997877 0.025480143774951766 0.9997333333333331
20 18 0.7 0.6 1.0 0.5 0 1 2019860002.646692 0.14496429252217075 12716899877.15417 0.754715476782345 0.16283168991147254 0.9836666666666667
21 19 0.7 0.8 0.5 0.0 1 4 3568806095.650769 0.07871915191895583 30032167448.892323 0.7629522316567776 0.025065573066454436 0.9920666666666663
22 20 0.9 0.1 1.0 1.0 4 4 2246819785.3982553 0.08289906596938025 16391553824.467003 0.7373396218956161 0.07195343604986927 0.9945999999999997
23 21 0.9 0.2 0.75 0.0 2 1 3330876703.8792706 0.07610629773949494 27674320366.79667 0.7742527429660275 0.028118070033153513 0.9895999999999999
24 22 0.9 0.3 0.0 0.5 1 3 3880659664.8644805 0.0940375231764736 31799708717.90585 0.701975186568906 0.02633369365903764 0.9999333333333333
25 23 0.9 0.6 0.5 0.25 3 0 3572889817.877089 0.0792317259747448 28817388267.385258 0.7624308348187311 0.027316029066635297 0.9926333333333331
26 24 0.9 0.8 0.25 0.75 0 2 3702065223.334019 0.08670772960451446 30971934313.33295 0.7391414945664546 0.02459908627439125 0.9962999999999997

Binary file not shown.