mdmre() { cat <<EOF
telecom1,0.519405,0.4117,0.495285,0.495285,0.328955,0.366775,0.44617,0.35637,0.654825,0.4117,0.4117,0.486995,0.3196,0.760345,0.493515,0.655095,0.481045,0.667265,0.667265,0.59089,0.59089,0.6764,0.74873,0.760415,0.60735,0.35387,0.452845,0.452845,0.50794,0.50794,0.405865,0.409925,0.759845,0.461985,0.260315,0.49449,0.49449,0.30487,0.30487,0.334755,0.36937,0.760025,0.28708,0.34936,0.40236,0.452845,0.408175,0.408175,0.36527,0.29644,0.75886,0.357805,0.369285,0.536815,0.4117,0.495285,0.495285,0.328955,0.366775,0.76037,0.35637,0.369285,0.423785,0.4117,0.4117,0.369285,0.369285,0.328955,0.369225,0.44529,0.3704,0.698695,0.4117,0.4117,0.495285,0.495285,0.312675,0.42739,0.44617,0.39295,0.369285,0.423785,0.4117,0.4117,0.369285,0.369285,0.328955,0.369225,0.44529,0.3704
kemerer,0.75138,0.64956,0.71059,0.74143,0.65507,0.46497,0.5516,0.54599,1.0962,0.64956,0.64956,0.7518,0.47226,0.85917,0.46943,0.69966,0.79454,0.57855,0.57855,0.73376,0.5175,0.69629,0.36685,0.8592,0.42709,0.80485,0.77515,0.77515,0.69406,0.51778,0.5516,0.35533,0.85896,0.4352,0.74265,0.63473,0.63473,0.68908,0.52618,0.61255,0.53017,0.85922,0.46001,0.7265,0.98907,0.34777,0.58807,0.71777,0.65507,0.46497,0.85901,0.26527,0.76397,0.7315,0.64956,0.6199,0.54127,0.65507,0.46497,0.85927,0.46943,0.68589,0.39681,0.32456,0.32456,0.68589,0.68589,0.5516,0.4465,0.5516,0.299,0.97091,0.54971,0.54971,0.71059,0.74143,0.5516,0.49633,0.5516,0.4352,0.7427,0.63457,0.48347,0.48347,0.61344,0.60894,0.6681,0.55119,0.42995,0.46943
cocomo81o,0.926865,0.648365,0.4865,0.65972,0.6452,0.459185,0.491435,0.647585,0.451835,0.648365,0.648365,0.61591,0.459185,0.50577,0.462845,0.520815,0.6856,0.497935,0.497935,0.58324,0.437925,0.366665,0.361785,0.50598,0.3224,0.77456,0.49662,0.49662,0.43872,0.576285,0.4449,0.365755,0.505815,0.39317,0.64851,0.44873,0.44873,0.38324,0.528715,0.556945,0.477275,0.505775,0.44675,0.669385,0.96347,0.589655,0.51738,0.566825,0.609165,0.409185,0.505295,0.52147,0.77942,0.741835,0.648365,0.47075,0.540255,0.6452,0.459185,0.50584,0.460785,0.73118,0.56845,0.675055,0.675055,0.593045,0.492275,0.45,0.49468,0.49144,0.60488,2.5671,0.45344,0.45344,0.4865,0.65972,0.537735,0.571995,0.491435,0.30596,0.648455,0.431905,0.560665,0.645835,0.37726,0.639595,0.590815,0.49468,0.49144,0.39005
cocomo81s,6.9136,0.98732,2.8851,3.8128,0.65563,0.96203,0.71543,0.98732,2.1729,0.98732,0.98732,8.6601,0.97562,4.8966,1.9038,4.8912,22.301,0.98732,0.98732,5.0032,3.5385,0.81197,0.97562,4.8932,4.0959,22.933,4.8408,4.8408,7.1732,6.0037,0.86727,0.97562,4.8884,4.8912,0.9134,0.98732,0.98732,9.0098,3.0172,0.81197,0.96203,4.8698,0.98732,4.0546,46.352,0.98732,6.0443,2.7297,0.77366,0.96203,4.8188,1.9514,3.5674,9.9905,0.98732,5.4246,3.6672,0.65563,0.96203,4.8872,2.7444,3.5674,10.608,0.98732,0.98732,3.5556,3.5556,0.74545,0.96203,4.8909,2.746,57.9115,0.98732,0.98732,2.8851,3.8128,0.96218,0.96909,0.71543,0.98732,4.8912,3.8684,1.5373,1.5373,1.88,1.88,0.96996,0.91026,4.8911,1.607
desharnaisL1,0.42078,0.314475,0.307345,0.306625,0.37359,0.31323,0.36379,0.297895,0.395625,0.314475,0.314475,0.355585,0.30712,0.493185,0.292815,0.530605,0.55969,0.496075,0.496075,0.44682,0.370085,0.453475,0.25859,0.49293,0.39809,0.58274,0.38694,0.38694,0.431425,0.34441,0.36198,0.353575,0.491,0.37301,0.398955,0.311875,0.311875,0.433035,0.391795,0.422555,0.397785,0.49255,0.36443,0.373405,0.397765,0.39564,0.412555,0.34559,0.3166,0.346205,0.49062,0.3335,0.30327,0.42078,0.314475,0.36241,0.295545,0.37359,0.31323,0.4933,0.302715,0.272415,0.257725,0.339,0.339,0.272415,0.272415,0.288525,0.28196,0.31501,0.25965,0.75794,0.397175,0.397175,0.307345,0.306625,0.310515,0.31126,0.36379,0.337165,0.272415,0.34803,0.29913,0.29913,0.295145,0.31386,0.288795,0.36721,0.35942,0.30171
desharnaisL3,0.14201,0.9457,0.449725,0.423585,0.48025,0.300725,0.216055,0.33641,4.50165,0.9457,0.9457,0.466465,0.34548,0.945035,0.61603,0.579675,4.0644,0.9457,0.9457,0.898545,0.62904,0.34548,0.59515,0.944385,0.717975,7.63975,0.9457,0.9457,0.70892,0.50424,0.39955,0.406705,0.94083,0.98985,0.62849,0.9457,0.9457,0.758675,0.45848,0.62198,0.300725,0.944135,0.51946,0.36977,1.4091,0.9457,0.42765,0.257165,0.40949,0.34548,0.94083,0.44592,0.6812,0.14201,0.9457,0.54793,0.42206,0.48025,0.300725,0.945485,0.283285,0.6812,0.451535,0.9457,0.9457,0.59177,0.59177,0.362305,0.345125,0.261015,0.337705,5.18775,0.9457,0.9457,0.449725,0.423585,0.622745,0.48052,0.216055,0.47801,0.6812,0.342215,0.9457,0.9457,0.5573,0.5613,0.300725,0.345125,0.23368,0.331545
albrecht,0.634455,0.50319,0.39492,0.41566,0.35266,0.47148,0.274335,0.24795,0.65118,0.50319,0.50319,0.62575,0.28133,0.94885,0.32093,0.983795,0.97239,0.553925,0.553925,0.809,0.802585,0.6219,0.46847,0.952305,0.513805,0.798165,0.506445,0.506445,0.63689,0.766055,0.513315,0.357685,0.94873,0.47538,0.634955,0.483495,0.483495,0.401705,0.38108,0.54919,0.376225,0.948735,0.48469,0.4626,0.374045,0.499435,0.33551,0.31073,0.42589,0.413445,0.940945,0.33791,0.57601,0.589395,0.50319,0.48595,0.3138,0.35266,0.47148,0.951405,0.28133,0.528655,0.608955,0.370995,0.370995,0.52423,0.52423,0.42648,0.403615,0.273355,0.329005,0.820755,0.37719,0.37719,0.39492,0.41566,0.677615,0.538085,0.274335,0.313485,0.528655,0.62113,0.370995,0.370995,0.39095,0.417465,0.35266,0.47148,0.35262,0.34125
cocomo81e,2.44145,0.72746,0.864065,1.33425,0.79142,0.7875,0.787255,0.783955,3.48075,0.72746,0.72746,2.54955,0.714765,2.3669,1.3185,1.03127,2.8342,1.10965,1.10965,1.75155,2.1197,0.70331,0.58947,2.37,0.920265,3.27595,0.924295,0.924295,2.3716,2.4133,0.763805,0.731335,2.37325,1.3783,2.046,1.67235,1.67235,1.53895,2.37615,0.79142,0.797705,2.3695,0.93033,0.78295,2.0083,0.963085,2.07855,2.06145,0.773865,0.753595,2.36645,0.963085,0.747235,2.88495,0.76962,2.24895,2.0274,0.79142,0.7875,2.3696,1.26205,0.737265,1.6548,0.65116,0.65116,0.737265,0.737265,0.777265,0.65525,0.787255,0.714335,4.15865,0.753475,0.753475,0.864065,1.33425,0.98247,0.945865,0.787255,0.792165,0.829145,1.015655,1.18304,1.18304,1.1015,1.41655,0.84157,0.76822,2.36975,0.854105
nasa93_center_5,0.52204,0.43704,0.54366,0.44726,0.62302,0.53509,0.69386,0.35208,1.0656,0.43704,0.43704,0.70353,0.60317,0.89991,0.53671,1.0018,0.88169,0.52593,0.52593,0.63211,0.74348,0.59,0.69298,0.8998,0.60453,0.83198,0.72134,0.72134,0.66704,0.60477,0.56883,0.60317,0.89954,0.56509,0.76196,0.67398,0.67398,0.89374,0.72282,0.74528,0.58333,0.89985,0.62302,0.54361,0.82877,0.54067,0.72,0.7658,0.71883,0.5,0.89962,0.54267,0.63827,0.59955,0.43704,0.79586,0.7687,0.62302,0.53509,0.89991,0.52956,0.63827,0.95037,0.47341,0.47341,0.63827,0.63827,0.40596,0.33333,0.69387,0.366,1.2534,0.43081,0.43081,0.54366,0.44726,0.43243,0.5625,0.69386,0.39264,0.63827,0.59956,0.47341,0.47341,0.60815,0.61349,0.49115,0.6,0.69387,0.38926
desharnaisL2,0.26719,0.26133,0.32508,0.32508,0.37057,0.34091,0.31176,0.33574,0.35008,0.26133,0.26133,0.27993,0.24846,0.58422,0.26133,0.3782,0.53365,0.46364,0.46364,0.36594,0.40546,0.42274,0.4113,0.58321,0.38187,0.54383,0.28739,0.28739,0.48552,0.44737,0.58248,0.30754,0.57944,0.37203,0.26852,0.32846,0.32846,0.24719,0.2596,0.42159,0.26975,0.58366,0.36722,0.42235,0.40082,0.35118,0.28793,0.32787,0.4113,0.39224,0.57884,0.28793,0.27454,0.26719,0.26133,0.33145,0.29612,0.37057,0.34091,0.58503,0.26827,0.27454,0.23049,0.33505,0.33505,0.27454,0.27454,0.34343,0.29559,0.30526,0.28507,0.6231,0.26827,0.26827,0.32508,0.32508,0.42159,0.26613,0.31176,0.22662,0.27454,0.25842,0.33505,0.33505,0.27049,0.27049,0.28571,0.27542,0.30519,0.25783
desharnais,0.36889,0.32947,0.33233,0.34634,0.42159,0.35343,0.34925,0.33241,0.42033,0.32947,0.32947,0.3799,0.3762,0.60261,0.35477,0.44144,0.51695,0.50506,0.50506,0.4335,0.41685,0.45968,0.38187,0.60277,0.4571,0.46126,0.28475,0.28475,0.42507,0.38823,0.48438,0.41919,0.60437,0.38788,0.37164,0.35982,0.35982,0.38325,0.41699,0.47166,0.42842,0.60234,0.37863,0.38041,0.3914,0.38742,0.39566,0.37224,0.31371,0.38104,0.60244,0.34823,0.31389,0.38961,0.32947,0.36726,0.4385,0.42159,0.35343,0.60238,0.30416,0.31389,0.33032,0.29274,0.29274,0.35059,0.35424,0.3205,0.30037,0.3456,0.29144,0.74852,0.53308,0.53308,0.33233,0.34634,0.41682,0.31371,0.34925,0.37023,0.31389,0.3152,0.26696,0.26696,0.34904,0.35244,0.28182,0.26613,0.34558,0.27784
maxwell,0.538595,0.453605,0.33878,0.341145,0.544585,0.562265,0.528995,0.401255,0.715885,0.453605,0.453605,0.56803,0.48432,0.79827,0.489655,0.53528,0.84277,0.485085,0.485085,0.54971,0.718195,0.663825,0.5722,0.799645,0.514495,0.888625,0.449635,0.449635,0.584435,0.60854,0.50994,0.42922,0.79996,0.39029,0.50524,0.606425,0.606425,0.53228,0.67136,0.550875,0.51116,0.79867,0.455095,0.598165,0.74338,0.612745,0.496245,0.50241,0.51973,0.58729,0.79857,0.464315,0.5401,0.499075,0.453605,0.503435,0.650415,0.544585,0.562265,0.798725,0.40599,0.397685,0.42756,0.420215,0.420215,0.363975,0.3647,0.437785,0.34497,0.529415,0.33545,0.937245,0.435015,0.435015,0.33878,0.341145,0.71718,0.675835,0.528995,0.37515,0.46072,0.35585,0.440295,0.440295,0.334365,0.343935,0.561465,0.586545,0.528985,0.358095
nasa93_center_1,0.488465,0.16759,0.44861,0.365545,0.266665,0.33333,0.39809,0.31158,0.710055,0.16759,0.16759,0.33021,0.33333,1.2407,0.336895,0.89163,2.27475,0.16759,0.16759,0.906405,1.4908,0.5386,0.82407,1.24235,0.779525,1.0653,0.88021,0.88021,1.12045,1.5238,0.583335,0.660895,1.24525,1.0758,0.390435,0.16759,0.16759,0.60416,1.23805,0.55,0.33333,1.24035,0.14313,0.260395,0.46074,0.16759,0.5097,1.002305,0.55,0.33333,1.2376,0.27869,0.31095,0.488465,0.16759,0.53875,1.27215,0.266665,0.33333,1.2409,0.54296,0.31095,0.30757,0.16759,0.16759,0.31095,0.31095,0.33333,0.33333,0.398095,0.32214,3.1397,0.16759,0.16759,0.44861,0.365545,0.633335,0.41821,0.39809,0.31158,0.31095,0.30757,0.16759,0.16759,0.382135,0.34643,0.33333,0.33333,0.39809,0.324145
sdr,12.0596,0.55417,1.3132,1.52255,0.5,0.5,1.65295,0.429805,1.23705,0.563335,0.563335,1.64935,0.701755,2.34576,0.562935,2.98695,29.84105,0.654975,0.654975,2.80475,1.628,0.8614,0.38095,2.335355,1.6414,44.5741,0.54765,0.54765,3.2952,1.4109,0.744735,0.33333,2.3319,1.5533,3.57955,0.9683,0.9683,1.9261,2.48604,0.5,0.5,2.336585,0.76836,0.43389,5.8479,0.971425,1.5444,2.53112,0.5625,0.602775,2.33213,0.855235,1.7785,25.346,0.55417,1.31645,2.07945,0.5,0.5,2.338865,0.6,1.7785,0.485995,0.55417,0.55417,0.942815,1.23805,0.80476,0.43,1.65275,0.455555,31.4981,0.72449,0.72449,1.3132,1.52255,0.505555,0.5,1.65295,0.803235,2.11225,0.92912,0.503445,0.503445,2.11225,2.11225,0.69188,0.397055,1.6529,0.46875
finnish,0.44693,0.22283,0.278565,0.25382,0.304515,0.415875,0.57483,0.22661,0.29468,0.22283,0.22283,0.4281,0.63968,0.66519,0.349975,0.35363,0.71885,0.243795,0.243795,0.38416,0.36628,0.32055,0.429325,0.664555,0.21831,0.849275,0.234175,0.234175,0.388475,0.35012,0.30969,0.328785,0.664415,0.24852,0.26507,0.333,0.333,0.3378,0.47788,0.336705,0.437195,0.66508,0.366465,0.49299,0.505545,0.239935,0.40573,0.353595,0.304515,0.351935,0.66502,0.29471,0.447795,0.384315,0.22283,0.38043,0.412195,0.304515,0.415875,0.66517,0.261255,0.447795,0.65424,0.22283,0.22283,0.447795,0.447795,0.187725,0.28754,0.66506,0.27933,0.867605,0.352945,0.352945,0.278565,0.25382,0.34364,0.429155,0.57483,0.33069,0.372315,0.40559,0.40394,0.40394,0.282005,0.25046,0.40029,0.32202,0.574805,0.308505
miyazaki94,0.535185,0.31031,0.45617,0.46369,0.460365,0.415825,0.53433,0.29173,1.63815,0.31031,0.31031,1.1134,0.26015,1.3173,0.632275,0.96126,1.18345,0.69511,0.69511,1.09605,0.97214,0.505305,0.442735,1.32525,0.758045,1.3098,0.535535,0.535535,1.3455,1.11775,0.499475,0.36096,1.3206,0.578595,0.36172,0.405215,0.405215,0.591225,0.61797,0.880225,0.59405,1.31985,0.504295,0.47604,2.0386,0.4337,0.5258,0.63361,0.683725,0.62533,1.3068,0.397765,0.501535,0.544305,0.31031,0.606745,0.5485,0.460365,0.415825,1.32385,0.371515,0.501535,0.46831,0.36743,0.36743,0.53076,0.541035,0.350755,0.371645,0.432145,0.26706,0.87507,0.407775,0.407775,0.45617,0.46369,0.64348,0.602585,0.53433,0.441445,0.724455,0.689945,0.483555,0.483555,0.724455,0.724455,0.7349,0.51219,0.527985,0.551345
nasa93_center_2,0.29459,0.3,0.40589,0.49209,0.28571,0.66667,0.90644,0.21844,0.7328,0.3,0.3,0.89038,0.71429,1.7654,0.42665,1.2182,1.7881,0.45226,0.45226,0.97313,0.99569,0.63158,0.71429,1.767,0.54974,0.85099,0.66421,0.66421,1.1494,0.82597,0.64,0.66667,1.7638,0.63764,0.80443,0.80499,0.80499,0.71125,1.141,0.77724,0.77143,1.7667,0.77724,0.58297,0.63425,0.62278,0.63417,1.0068,0.64444,0.73469,1.7672,0.57292,0.46108,0.28005,0.3,0.53813,1.1168,0.28571,0.66667,1.7663,0.2125,0.27336,0.75713,0.35185,0.35185,0.48297,0.43124,0.19665,0.57895,0.90644,0.21084,4.609,0.32619,0.32619,0.40589,0.49209,0.42857,0.6569,0.90644,0.27398,0.68865,0.32639,0.37982,0.37982,0.68865,0.68865,0.33333,0.25714,0.90644,0.37283
cocomo81,4.7315,0.75059,1.4967,2.0805,0.90385,0.85031,1.2635,1.397,6.0832,0.75059,0.75059,3.4214,0.81628,6.058,2.0643,5.7684,5.5246,0.75335,0.75335,4.003,5.7824,0.92105,0.75261,6.0798,3.3636,8.0185,0.72778,0.72778,3.566,6.1747,0.827,0.83443,6.0841,3.2074,1.5792,0.76052,0.76052,4.732,4.9782,0.775,0.77366,6.0724,3.2279,4.0986,4.947,1.0604,4.0478,5.9978,0.83333,0.85031,6.0903,2.8972,4.7201,5.2143,0.75059,4.4967,5.2606,0.90385,0.85031,6.072,2.7766,4.1472,2.4969,0.73889,0.73889,1.4248,1.4566,0.67347,0.75949,1.2635,0.81338,3.4831,0.60207,0.60207,1.4967,2.0805,0.80727,0.72727,1.2635,1.1886,2.2459,2.5902,0.77931,0.77931,2.3835,2.3681,0.7193,0.79492,1.2635,1.5058
nasa93,0.54855,0.46133,0.6309,0.64223,0.56883,0.64444,0.86378,0.48178,0.91686,0.46133,0.46133,0.81826,0.64286,1.4934,0.4794,1.3919,1.2243,0.63274,0.63274,1.3265,0.9414,0.7,0.58333,1.4938,0.79708,0.80299,0.43286,0.43286,0.90351,1.1714,0.57143,0.63968,1.4918,0.51922,0.78421,0.7581,0.7581,0.96727,1.0926,0.8,0.68,1.4916,0.71429,0.84446,0.7925,0.68571,0.87627,0.8752,0.8,0.71883,1.485,0.66667,0.71066,0.52717,0.46133,0.7911,0.86192,0.56883,0.64444,1.4934,0.40476,0.8258,0.71555,0.46313,0.46313,0.63624,0.69676,0.33333,0.38889,0.86378,0.4794,1.5501,0.48236,0.48236,0.6309,0.64223,0.62405,0.608,0.86378,0.46667,0.71066,0.41357,0.40485,0.40485,0.63671,0.57916,0.39302,0.57577,0.86377,0.46519
china,0.09,0.07,0.08,0.09,0.31,0.31,0.09,0.06,1,0.07,0.07,0.82,0.31,1.14,0.29,0.81,0.76,0.31,0.31,0.81,0.83,0.34,0.32,1.15,0.48,0.8,0.21,0.21,0.83,0.88,0.34,0.27,1.14,0.42,0.73,0.71,0.71,0.72,1.08,0.67,0.66,1.14,0.71,0.57,0.57,0.56,0.55,0.93,0.63,0.59,1.14,0.55,0.09,0.09,0.07,0.25,0.78,0.31,0.31,1.15,0.08,0.09,0.09,0.07,0.07,0.09,0.09,0.28,0.28,0.08,0.06,0.85,0.06,0.06,0.08,0.09,0.38,0.33,0.09,0.06,0.08,0.08,0.08,0.08,0.08,0.08,0.1,0.1,0.08,0.08
EOF
}
one11() { mdmre | gawk -F, 'NR>1 {print $1 " " $2 " " $12  " " $12 - $2 | "sort -n -k 4"}'; }
one11 > "one11.dat"

mdmresByData() { mdmre | gawk -F, 'NR>1 {SUBSEP=" "}
					NR >=2 {N++; for(i=2;i<=91;i++)  x[i-1] += $i}

					  END {
					  	report("mdmreTimm", x,2,NF)
				  }
function report(header,a,min,max,   div,i,f) {
	f="dall" header ".dat"
	print f
	print "" > f
    for(i=1;i<=90; i++) 
		if (a[i] != "")
				print i," ", a[i]/N >> f
	close(f)
}
'
}
mdmresByData
gnuplot <<EOF
set size 0.5,0.5
set terminal postscript eps color enhanced "Helvetica" 12
set output "mdmres.eps
set ylabel "MdMRE"
set xlabel "algorithms, sorted by their rank in Figure 4"
set title "Performance, grouped by algorithms"
set xrange [0:90]
set nokey
set notitle
plot "dallmdmreTimm.dat"  with lines
EOF
epstopdf mdmres.eps

