R Under development (unstable) (2023-11-06 r85483 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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. > library(kappalab) Loading required package: lpSolve Loading required package: quadprog Loading required package: kernlab > > > ## the number of alternatives > n.a <- 300 > > ## a randomly generated 5-criteria matrix > C <- matrix(rnorm(5*n.a,10,2),n.a,5) > > ## the corresponding global scores > g <- numeric(n.a) > mu <- capacity(c(0:29,29,29)/29) > for (i in 1:n.a) + g[i] <- Choquet.integral(mu,C[i,]) > > ## the full solution > lsc <- least.squares.capa.ident(5,5,C,g) > a <- lsc$solution > a Mobius.capacity {} 0.000000 {1} 0.034596 {2} 0.069044 {3} 0.103605 {4} 0.138047 {5} 0.172499 {1,2} 0.103275 {1,3} 0.103183 {1,4} 0.103346 {1,5} 0.103418 {2,3} 0.172165 {2,4} 0.172240 {2,5} 0.172409 {3,4} 0.206687 {3,5} 0.206813 {4,5} 0.207134 {1,2,3} -0.034198 {1,2,4} -0.034391 {1,2,5} -0.034624 {1,3,4} -0.034103 {1,3,5} -0.034383 {1,4,5} -0.034817 {2,3,4} -0.102974 {2,3,5} -0.103346 {2,4,5} -0.103750 {3,4,5} -0.172318 {1,2,3,4} -0.104078 {1,2,3,5} -0.103536 {1,2,4,5} -0.103038 {1,3,4,5} -0.104320 {2,3,4,5} -0.138953 {1,2,3,4,5} 0.174369 > mu.sol <- zeta(a) > > ## the difference between mu and mu.sol > mu@data - mu.sol@data [1] 0.000000e+00 -1.130585e-04 -7.843335e-05 -1.868969e-05 -1.568530e-04 [6] -4.502283e-06 1.341115e-05 5.342807e-05 -1.156454e-04 -1.266053e-04 [11] -1.986259e-05 4.999950e-05 -6.272833e-05 -1.881777e-04 -1.920426e-04 [16] 1.083424e-04 -8.492543e-05 -1.675514e-04 -1.580977e-04 7.311585e-05 [21] -1.581720e-04 -7.551268e-05 -8.477036e-05 1.142380e-04 -4.375305e-04 [26] -8.377501e-05 -3.503134e-05 1.303253e-04 -3.967990e-04 6.142619e-04 [31] 7.003078e-04 1.574801e-08 > > ## the residuals > lsc$residuals [1] -4.819219e-04 -3.262310e-05 -4.819530e-04 -2.960138e-04 -1.893444e-05 [6] -1.658230e-04 4.290069e-04 -2.261075e-04 3.706450e-04 -5.700321e-05 [11] -3.212917e-04 -2.937694e-04 -2.847656e-04 -3.657407e-04 -6.717734e-04 [16] -1.388363e-05 -5.530513e-05 9.350329e-05 -9.073229e-05 9.143682e-04 [21] 2.497892e-04 -4.646917e-04 3.938236e-05 4.286729e-05 1.189671e-04 [26] -4.375791e-04 1.670255e-03 -2.106035e-04 9.688119e-05 2.224690e-04 [31] 1.654767e-04 1.921271e-04 -2.433043e-04 1.356408e-04 6.506295e-04 [36] -2.163028e-04 -1.083343e-04 3.903757e-04 -6.594502e-04 -2.427798e-05 [41] -2.228010e-04 -2.556679e-04 -1.510720e-04 1.662062e-03 -7.365492e-04 [46] 2.775783e-05 1.631759e-03 -1.931070e-04 -1.770373e-04 -2.117167e-04 [51] -3.469492e-04 2.869089e-04 3.265975e-04 -3.261166e-04 1.992364e-04 [56] -4.050850e-04 6.283876e-04 -3.940669e-04 -3.545625e-04 -2.936171e-04 [61] 4.051107e-04 -1.473237e-04 -5.377775e-04 7.195990e-06 1.658720e-04 [66] 5.716249e-04 -7.454544e-04 -1.889712e-04 7.574208e-04 2.403182e-04 [71] 4.165901e-04 -2.502030e-04 1.550205e-04 -4.105155e-04 -4.970241e-05 [76] 2.324591e-04 -5.411260e-05 -2.304488e-05 -1.917358e-04 1.374733e-04 [81] -4.589899e-04 -6.884357e-04 -3.352177e-04 1.087228e-03 3.719919e-03 [86] -3.495324e-04 4.217222e-04 -1.915961e-04 -1.185150e-04 -6.710063e-05 [91] -4.821351e-04 -2.683401e-05 -2.074821e-04 -2.999359e-04 -1.264409e-04 [96] 2.974695e-04 -4.159791e-04 -3.825265e-04 1.098250e-04 -4.824436e-05 [101] 3.081558e-04 3.699022e-04 3.979434e-04 8.076568e-04 1.104270e-04 [106] 1.615301e-04 3.534722e-04 -4.779098e-04 3.962926e-04 4.267041e-04 [111] 2.473960e-05 -1.366137e-04 2.090161e-05 -1.767625e-04 -6.972875e-04 [116] -4.976896e-04 -1.710182e-04 -8.885001e-04 -5.837396e-06 -4.110361e-04 [121] -7.479193e-04 -2.638462e-04 -4.312357e-04 -2.362579e-04 -1.004775e-04 [126] 1.055239e-03 1.116219e-06 1.364995e-04 -2.380217e-04 -1.186726e-04 [131] 1.049190e-03 -1.177991e-04 2.102930e-04 4.386600e-04 5.720876e-05 [136] -1.749153e-04 1.398250e-04 9.222512e-04 2.183695e-03 -7.108821e-05 [141] -1.078223e-04 2.026093e-04 -3.456792e-04 9.277130e-05 7.806306e-05 [146] 3.236719e-04 -1.236030e-04 -1.134531e-05 1.657279e-04 -1.692351e-04 [151] 2.081827e-04 3.809180e-05 -5.160029e-05 1.250355e-03 1.408751e-04 [156] 9.415761e-05 -4.474137e-04 1.131636e-03 -5.934174e-04 1.523433e-03 [161] -1.870122e-04 1.637804e-03 -8.271160e-05 9.574813e-05 -3.446487e-04 [166] -2.437108e-04 2.185940e-04 1.651961e-04 -3.886377e-04 9.841428e-05 [171] 3.758718e-04 -1.219208e-04 -1.255012e-04 -3.884238e-04 -2.718082e-04 [176] 1.406227e-04 -4.022995e-04 -1.300033e-04 -7.952710e-05 -1.911079e-04 [181] -5.454817e-05 9.517747e-05 -1.905421e-05 -8.283405e-05 8.000848e-05 [186] 2.459598e-05 -4.179074e-04 2.696041e-04 1.462231e-03 -7.832477e-05 [191] -3.387386e-04 4.471802e-04 -4.660626e-05 -1.249969e-04 -1.093403e-05 [196] 3.635974e-04 3.796470e-04 -7.603626e-05 -1.471039e-04 8.883319e-05 [201] 6.243746e-04 -5.938195e-05 -6.287906e-04 -4.050868e-04 3.370794e-04 [206] 9.487573e-05 2.065402e-04 1.895793e-04 -2.802504e-04 1.878379e-04 [211] -8.887338e-05 7.666018e-04 7.529407e-05 5.547458e-05 8.695280e-05 [216] 2.140440e-03 -5.239294e-04 9.028768e-04 4.200303e-04 -3.450020e-05 [221] 1.564319e-04 1.248631e-03 7.760690e-04 2.908156e-04 1.194196e-03 [226] -4.634599e-04 1.361505e-04 -4.964101e-04 1.665485e-03 -6.027698e-05 [231] -7.439328e-04 -4.153223e-05 -1.029537e-04 -1.098332e-04 -3.748350e-04 [236] 2.194455e-03 -2.189060e-04 -2.099812e-04 -1.503646e-04 6.463922e-05 [241] 6.929298e-05 -3.641911e-04 1.876705e-04 6.601709e-04 2.379866e-04 [246] 7.300091e-04 1.108239e-04 -2.145384e-04 -7.637710e-05 -1.442825e-04 [251] -4.822303e-04 1.566382e-04 3.319877e-05 -1.026986e-03 8.663060e-04 [256] 4.623806e-04 -1.010560e-03 -5.962539e-04 4.252537e-04 -9.249134e-05 [261] 6.561004e-05 -3.275192e-04 -1.624669e-04 -2.270447e-04 -1.359011e-04 [266] -2.135617e-04 -2.013366e-04 -1.987615e-04 -6.049068e-04 5.570295e-04 [271] 7.147528e-05 -2.130307e-04 1.345602e-05 8.210075e-05 -1.726105e-04 [276] -1.304112e-04 1.054051e-03 -2.235065e-04 -4.503263e-04 -4.161117e-05 [281] 1.656967e-04 2.987973e-04 -6.248026e-05 -1.234634e-05 -3.903122e-04 [286] -3.218163e-04 -7.689597e-05 -2.955971e-04 1.200387e-04 7.027781e-05 [291] 6.834523e-04 3.740822e-05 8.723757e-04 3.171000e-05 1.201255e-04 [296] -8.561878e-04 -1.031719e-05 -2.157122e-04 -7.648621e-06 -1.994735e-04 > > ## the mean square error > mean(lsc$residuals^2) [1] 3.019739e-07 > > ## a 3-additive solution > lsc <- least.squares.capa.ident(5,3,C,g) > a <- lsc$solution > mu.sol <- zeta(a) > mu@data - mu.sol@data [1] 0.000000e+00 4.084286e-03 5.629639e-03 -9.685725e-03 6.868371e-03 [6] -8.031081e-03 -1.657188e-02 -1.759008e-03 8.454298e-03 -1.161513e-02 [11] -9.559355e-03 2.789674e-03 -1.881809e-02 1.727438e-03 3.290322e-03 [16] 1.918011e-03 4.032036e-03 -9.648456e-03 -1.931120e-02 1.664827e-03 [21] -1.925161e-02 -3.413703e-03 6.930602e-03 3.088729e-03 -1.453312e-02 [26] 2.427204e-05 4.365305e-03 1.949053e-03 2.433429e-03 2.659641e-03 [31] 2.118232e-03 1.504500e-08 > lsc$residuals [1] 0.0204660539 0.0044580131 0.0188714461 0.0066049858 0.0167610818 [6] -0.0096416101 0.0170827535 0.0072156994 -0.0097234352 0.0040473176 [11] 0.0132946348 0.0164996321 -0.0114732648 -0.0079221996 -0.0008568884 [16] -0.0019862764 0.0111973318 -0.0096327723 -0.0157753276 0.0003976920 [21] 0.0124162728 0.0291060868 -0.0070592588 -0.0178975991 -0.0117387877 [26] 0.0018899406 0.0039851983 0.0066581140 -0.0095001820 0.0092693511 [31] 0.0119001701 0.0061280297 0.0176107451 -0.0167428127 0.0092311126 [36] -0.0036044955 0.0016129213 0.0022135080 0.0240099590 0.0020059377 [41] 0.0343333353 -0.0127159001 0.0212964910 0.0068249665 -0.0204709730 [46] 0.0105983976 0.0041588792 -0.0026174442 -0.0105903785 0.0103667954 [51] 0.0088221322 -0.0035189024 -0.0034937992 -0.0384091522 0.0099632589 [56] -0.0154346435 0.0166664346 0.0018184619 0.0082635730 -0.0178974650 [61] 0.0091550243 -0.0159267500 0.0190659694 -0.0093054677 0.0032052165 [66] -0.0086237929 0.0048430776 0.0021642750 0.0119817151 0.0096577465 [71] -0.0030491064 -0.0128663650 0.0121183394 -0.0358944945 0.0223039738 [76] -0.0091106377 0.0237747856 0.0098518230 0.0172639309 0.0010487256 [81] -0.0180862552 0.0177173548 0.0165330275 0.0047503245 0.0179692101 [86] -0.0305824804 0.0154758748 0.0004537782 -0.0037883850 0.0063138281 [91] -0.0203156084 0.0017283411 0.0036666695 0.0018769692 -0.0111920143 [96] -0.0262530853 0.0064115366 0.0079061069 -0.0018275763 -0.0034149352 [101] 0.0017825329 -0.0097299848 0.0192194079 0.0081837034 -0.0040069135 [106] -0.0320533450 0.0136137659 -0.0200979019 0.0032712635 0.0119950853 [111] -0.0091482272 -0.0130366456 -0.0047718257 -0.0002122221 -0.0056521153 [116] -0.0161021368 0.0089399686 0.0012783165 0.0217889879 -0.0352649644 [121] -0.0083144389 0.0141347073 -0.0163435983 0.0125967768 -0.0541218239 [126] 0.0030548941 0.0042340282 -0.0080260581 0.0051640808 0.0161030118 [131] 0.0154636234 -0.0119697076 0.0099542252 0.0033747642 0.0110128534 [136] -0.0016320883 0.0194144561 0.0116658495 0.0095852127 -0.0020869525 [141] -0.0176382667 -0.0118905067 -0.0060356685 0.0178184497 -0.0016788756 [146] 0.0008934137 -0.0106332541 0.0122765202 -0.0115522044 0.0021029604 [151] 0.0065406586 0.0199938317 -0.0149268045 -0.0052959858 -0.0022162977 [156] -0.0183115855 -0.0107403010 0.0187474100 -0.0106219620 0.0088346282 [161] 0.0125840126 0.0121051219 -0.0255321890 0.0070298541 0.0082096921 [166] -0.0072747772 0.0080792326 0.0011068118 0.0203366954 -0.0009028415 [171] -0.0355222188 0.0130639690 -0.0030017599 0.0003596676 0.0071904365 [176] 0.0011304271 -0.0135482088 -0.0095420787 -0.0030267892 0.0059528573 [181] -0.0498054356 -0.0116389310 0.0068419753 0.0157717010 0.0072317439 [186] 0.0042841692 0.0141829813 -0.0110768083 0.0251453416 0.0038605423 [191] 0.0130806494 -0.0108502135 -0.0079621765 -0.0138585767 -0.0001219966 [196] -0.0178989516 0.0061630190 -0.0003536112 -0.0268505067 0.0083567334 [201] 0.0118562813 -0.0186598500 -0.0079270533 0.0167854767 0.0119880632 [206] 0.0005592316 -0.0003741618 0.0098147641 0.0175566421 -0.0080343238 [211] 0.0273033306 0.0064557334 -0.0173452200 -0.0113416733 0.0033911704 [216] 0.0094077695 0.0061990825 -0.0347337101 0.0007321117 0.0259934612 [221] -0.0021261054 0.0060692249 0.0097871421 -0.0142020553 0.0101670120 [226] 0.0139525787 -0.0119300230 -0.0058678103 -0.0082716791 -0.0277387304 [231] 0.0124642876 0.0112615775 -0.0283987752 -0.0187788162 -0.0075084202 [236] -0.0006338811 0.0035302937 -0.0154513827 -0.0133652081 0.0121635434 [241] 0.0007454002 0.0228595692 0.0083288741 -0.0207396363 0.0066767444 [246] -0.0083145792 -0.0007852001 0.0080086228 0.0090376293 -0.0147977152 [251] 0.0094043524 -0.0281001499 0.0017027237 -0.0321677650 -0.0014440386 [256] -0.0059735692 -0.0109942456 -0.0107922333 -0.0118834682 -0.0085195666 [261] 0.0153708352 0.0257954402 0.0170791197 -0.0030228378 0.0123099980 [266] 0.0082905075 0.0012701376 -0.0120034970 0.0068786474 -0.0231498175 [271] 0.0178994581 0.0074785536 0.0040591453 -0.0248854791 -0.0210743133 [276] 0.0070527270 -0.0022032731 0.0055379071 -0.0174547233 -0.0198412717 [281] 0.0042770581 0.0073518155 0.0092861242 0.0144091042 -0.0123033968 [286] -0.0181689370 0.0109293276 -0.0010920414 0.0075095703 0.0071989205 [291] 0.0171607477 0.0067203807 0.0241129019 -0.0108596457 -0.0088813109 [296] -0.0470146090 -0.0006537729 -0.0291557303 -0.0004869603 0.0293997578 > > > > > ## a similar example based on the Sipos integral > > n.a <- 300 > ## a randomly generated 5-criteria matrix > C <- matrix(rnorm(5*n.a,0,2),n.a,5) > > ## the corresponding global scores > g <- numeric(n.a) > mu <- capacity(c(0:29,29,29)/29) > for (i in 1:n.a) + g[i] <- Sipos.integral(mu,C[i,]) > > ## the full solution > lsc <- least.squares.capa.ident(5,5,C,g,Integral = "Sipos") > a <- lsc$solution > mu.sol <- zeta(a) > mu@data - mu.sol@data [1] 0.000000e+00 1.785898e-06 1.149470e-05 -2.274408e-05 -5.864882e-06 [6] -2.096273e-05 -3.481930e-05 -5.040966e-06 -7.044803e-06 -2.848360e-05 [11] -1.027817e-05 4.152449e-06 -7.783643e-06 -1.391160e-07 1.329032e-08 [16] 1.392503e-05 -4.110088e-06 -1.582466e-06 -1.629218e-05 -6.972114e-06 [21] -2.107197e-05 -3.840564e-06 -3.501744e-05 2.081511e-06 -7.690965e-06 [26] -3.299412e-05 -4.409193e-05 5.682005e-06 -3.114487e-05 3.146834e-04 [31] 2.059961e-04 1.395628e-11 > lsc$residuals [1] 1.113580e-05 -4.593517e-05 -1.710583e-05 -3.518986e-05 -2.528445e-06 [6] 2.391936e-05 -1.199893e-05 -5.453260e-06 -2.882978e-05 -1.910846e-05 [11] 1.115458e-06 1.503457e-05 -2.673264e-06 1.474551e-05 -3.346454e-05 [16] 3.662167e-06 4.935466e-05 1.075307e-06 -1.636000e-04 -4.553898e-06 [21] -1.355281e-05 6.601364e-06 1.540770e-05 1.473449e-05 -6.070217e-05 [26] -4.653759e-05 -4.564929e-06 1.283347e-05 2.524713e-05 1.853364e-05 [31] -7.651596e-05 9.227280e-06 1.664634e-05 1.102785e-05 -3.474355e-05 [36] -1.787349e-05 8.435972e-06 8.307037e-06 -3.359036e-05 -3.290745e-06 [41] 8.324711e-06 -1.038117e-04 2.004764e-04 1.981034e-05 3.442635e-05 [46] 1.141891e-05 -2.047793e-05 1.268053e-05 1.539916e-05 5.990422e-07 [51] 3.640922e-05 4.532235e-05 -3.872536e-06 1.727020e-04 1.230120e-06 [56] -6.841978e-05 -3.105977e-05 3.012138e-06 3.497516e-05 -3.756150e-05 [61] 4.980937e-06 -1.752554e-05 5.831210e-05 6.631499e-06 -1.784299e-05 [66] 7.647285e-06 1.381855e-05 -2.417332e-05 -4.225733e-05 -5.875570e-06 [71] -4.184238e-05 1.256154e-05 -3.141134e-05 1.074248e-05 1.525589e-06 [76] -3.214057e-05 3.159345e-06 -2.858586e-08 -2.491893e-05 1.827311e-05 [81] -4.801685e-05 1.027713e-05 6.696435e-06 -3.042236e-05 -9.918183e-06 [86] -2.365594e-05 -6.251941e-06 1.932634e-05 1.300698e-05 1.469769e-05 [91] 1.064121e-05 -1.319050e-05 -3.102719e-05 -1.970497e-05 -3.300195e-06 [96] -6.608371e-05 2.397410e-05 -2.872701e-05 -6.384409e-06 -2.937841e-05 [101] -7.059384e-06 2.121595e-05 3.161578e-05 -8.139442e-06 -2.057936e-06 [106] 6.010262e-05 -8.603329e-06 1.931525e-05 -9.709101e-05 1.626073e-05 [111] -1.745362e-05 -3.643927e-05 -6.392415e-05 9.192760e-06 -2.048094e-05 [116] 2.227725e-05 2.746921e-05 -6.986104e-06 4.004600e-06 -3.597492e-05 [121] -2.928289e-05 -8.948579e-07 -5.840415e-05 2.226677e-06 5.155932e-05 [126] 1.014894e-04 6.016955e-06 -5.143528e-08 -2.767149e-04 1.537460e-05 [131] -2.623135e-04 1.001930e-05 8.278797e-07 3.585797e-06 2.929035e-05 [136] -1.282486e-05 9.955268e-05 -4.216393e-05 1.662677e-05 -1.689066e-04 [141] 2.681374e-05 -4.157214e-05 6.150192e-06 5.715820e-06 -9.107588e-06 [146] 5.017522e-05 -2.132830e-04 -2.694661e-06 -7.897567e-06 -1.360579e-04 [151] 1.248977e-05 -4.081282e-06 2.248503e-05 3.460829e-06 1.527641e-05 [156] -8.055133e-05 -4.423667e-05 9.246652e-05 -6.420263e-06 1.660747e-04 [161] -1.039370e-05 -2.550998e-05 -2.950702e-06 1.837564e-05 -1.001601e-05 [166] -4.852230e-05 2.208361e-06 2.212361e-05 -1.001428e-05 -3.930875e-06 [171] 4.866927e-06 6.185844e-07 4.778883e-06 -1.950000e-05 -1.566926e-05 [176] 7.433047e-06 -3.200003e-05 7.301907e-06 1.296149e-05 -4.506362e-05 [181] -2.656173e-05 -4.543869e-05 4.696391e-05 -2.920334e-05 -6.462822e-06 [186] 4.901928e-07 1.281389e-05 -2.630520e-05 -1.181962e-04 3.161321e-05 [191] 3.816688e-05 -3.842973e-07 -2.268731e-05 -3.103341e-05 -3.185207e-05 [196] -2.642180e-06 -1.975662e-05 -5.523019e-05 1.476990e-04 1.780308e-05 [201] 3.533418e-07 6.402637e-06 -4.994659e-06 -2.331399e-05 -2.934986e-06 [206] -1.167228e-06 -6.304249e-06 -2.492370e-05 -1.231471e-06 -1.385216e-04 [211] -3.847478e-06 1.494917e-05 2.680040e-04 -1.077389e-05 5.981407e-06 [216] 1.461006e-05 -7.226189e-06 1.494870e-04 2.401755e-04 3.971414e-05 [221] 4.769865e-05 -7.488484e-05 -2.588169e-05 -2.387244e-05 2.989531e-05 [226] -1.715592e-05 -1.250145e-05 2.135289e-06 -2.064058e-05 -2.226168e-05 [231] -1.522522e-05 1.307270e-04 -1.732970e-06 -1.783957e-05 -2.030184e-06 [236] -8.403429e-05 -2.040152e-05 -8.763068e-06 -2.700742e-07 1.590318e-05 [241] -7.238162e-06 -3.984085e-06 -5.327727e-05 1.478485e-05 -1.189298e-05 [246] -2.458838e-05 1.307214e-05 -2.283008e-05 -1.845616e-06 8.940612e-06 [251] -1.995748e-05 1.541489e-05 4.242810e-05 1.374232e-05 1.626182e-06 [256] 1.763517e-06 -1.559205e-05 -4.194894e-05 -1.541689e-05 6.297125e-05 [261] -3.591417e-05 1.418546e-05 2.230667e-06 -2.931589e-05 -2.043083e-05 [266] -4.729640e-06 -1.025472e-05 3.902319e-06 1.675766e-06 1.373316e-05 [271] -5.088437e-05 3.275703e-05 3.119109e-05 6.250681e-06 8.570020e-06 [276] -2.694507e-05 -1.073237e-05 -1.668218e-05 -4.133452e-05 1.987803e-04 [281] 9.507656e-06 -6.401576e-05 -1.870062e-05 2.756301e-05 -1.171602e-04 [286] -5.861469e-05 -1.051374e-05 1.257627e-05 9.832821e-05 2.832835e-05 [291] 2.961945e-05 2.717033e-05 1.021926e-05 1.985040e-07 -2.444842e-05 [296] 1.381223e-05 -1.922920e-07 -7.100257e-06 -9.256412e-07 -4.445890e-06 > > ## a 3-additive solution > lsc <- least.squares.capa.ident(5,3,C,g,Integral = "Sipos") > a <- lsc$solution > mu.sol <- zeta(a) > mu@data - mu.sol@data [1] 0.000000e+00 2.734492e-03 3.234517e-03 -1.091866e-02 2.067557e-03 [6] -1.651026e-02 -1.461749e-02 -9.290862e-04 2.633994e-03 -1.429956e-02 [11] -1.229601e-02 9.895450e-03 -1.046176e-02 5.629529e-03 1.314551e-02 [16] 1.406743e-02 2.682232e-03 -9.715324e-03 -1.412234e-02 1.388294e-03 [21] -1.694405e-02 4.273980e-03 1.609480e-02 1.092664e-02 -1.330472e-02 [26] 4.060263e-03 1.047285e-02 8.310436e-03 8.840018e-03 1.070946e-02 [31] 2.986824e-03 4.023475e-10 > lsc$residuals [1] 1.129695e-02 -8.047015e-03 -3.073352e-03 1.012018e-02 8.062393e-03 [6] 2.548391e-02 8.870050e-04 2.023706e-03 2.417538e-02 1.952038e-03 [11] 8.042964e-03 5.502609e-03 -4.930254e-03 -2.138466e-03 6.309661e-03 [16] -1.688644e-02 -2.116099e-02 1.464868e-02 8.505549e-04 -2.592382e-02 [21] -1.486564e-02 1.065163e-02 -6.854814e-03 -9.157932e-03 6.894837e-03 [26] -1.878324e-02 1.737999e-04 -1.229154e-02 1.214756e-02 3.366364e-02 [31] -7.037516e-03 1.930585e-03 3.688082e-03 -3.628778e-03 -7.947617e-03 [36] 5.917812e-03 -3.215355e-03 -1.037740e-02 -2.123264e-02 4.412400e-03 [41] 8.678861e-03 -7.373600e-03 9.644986e-03 -6.898740e-03 2.451350e-02 [46] -5.855272e-04 3.537025e-03 -3.347225e-05 -3.785025e-03 -1.676577e-02 [51] 4.551561e-03 1.873566e-02 -3.310348e-02 -1.138723e-02 4.441550e-03 [56] 4.966915e-03 3.211036e-04 1.163172e-03 2.502698e-03 -2.742865e-02 [61] -2.530320e-03 1.153236e-02 9.662159e-03 -1.930302e-02 8.079897e-03 [66] -3.051752e-03 3.212828e-03 2.789005e-03 1.142227e-02 -7.247633e-03 [71] -7.121383e-03 -3.211932e-02 -1.712702e-02 1.243505e-02 -1.066367e-02 [76] -1.591848e-02 -3.202982e-03 -3.240775e-03 -1.778114e-02 -1.134929e-02 [81] -2.116131e-02 1.561750e-02 -1.199192e-03 -2.518328e-02 -2.599617e-03 [86] -5.994463e-03 -8.283824e-03 -1.408761e-02 6.709928e-04 9.446839e-03 [91] 2.607490e-02 -6.044449e-03 2.075329e-03 -7.742975e-03 -1.027765e-03 [96] -2.673963e-03 7.909253e-03 2.750248e-03 -7.073697e-03 9.843761e-04 [101] -4.996770e-03 -1.302906e-02 1.618072e-02 5.733730e-03 -1.525783e-03 [106] -4.118378e-03 2.480671e-02 -2.336532e-03 9.152490e-03 8.434588e-03 [111] 3.017426e-02 -1.650400e-02 -2.241764e-02 -1.346052e-02 -1.370552e-02 [116] -6.741390e-03 -2.493024e-03 -1.058765e-02 4.114813e-03 -1.156433e-02 [121] -7.856534e-03 3.830633e-02 1.386030e-02 8.894180e-03 -1.984197e-02 [126] -7.343120e-03 4.202015e-04 -3.477532e-03 -1.445524e-02 1.740691e-02 [131] -1.911667e-03 9.824223e-04 -1.365020e-02 -1.541187e-02 1.231749e-02 [136] -2.276811e-02 -1.977110e-03 -2.810687e-02 1.396583e-02 -4.989141e-03 [141] 3.518190e-02 -3.601622e-03 2.804909e-03 8.032858e-04 -1.036091e-02 [146] -1.716638e-02 -1.302863e-02 -1.893239e-02 1.100327e-03 5.168872e-03 [151] 5.806641e-03 2.114379e-02 -3.677381e-04 9.172258e-03 7.779442e-03 [156] 1.061072e-02 5.493757e-03 1.365525e-02 7.101167e-03 5.171422e-03 [161] 2.784709e-03 -1.777701e-02 -1.780210e-02 8.174946e-03 8.184808e-03 [166] -8.741083e-03 9.287214e-03 3.188127e-03 3.850242e-03 9.371585e-03 [171] -1.941422e-02 1.099448e-02 -1.411537e-02 6.019741e-03 4.736570e-03 [176] -1.526430e-02 1.558700e-03 1.043938e-02 1.110554e-02 -2.641038e-05 [181] -3.536662e-03 7.843454e-03 1.320353e-02 1.598019e-03 -1.019865e-02 [186] -1.812367e-02 1.414708e-03 1.589434e-03 2.646399e-03 1.873275e-02 [191] 1.905970e-02 -2.972112e-04 -1.843374e-02 3.187919e-03 -4.833474e-03 [196] -1.954831e-02 -7.983604e-03 -1.553303e-02 -3.372874e-03 9.468067e-04 [201] 1.448334e-02 -3.177663e-04 3.044899e-03 1.721145e-02 -1.265657e-02 [206] -2.778764e-03 -3.687257e-02 -9.584602e-05 -4.811663e-03 -2.164869e-03 [211] -1.216237e-04 -1.343453e-03 8.339638e-03 -1.067595e-03 -9.483390e-04 [216] 1.765544e-02 -1.287302e-02 -5.454457e-03 -1.446135e-03 1.215545e-02 [221] 8.419043e-03 1.276275e-02 9.151868e-03 2.200394e-03 1.436943e-02 [226] 5.126179e-03 -9.902068e-03 -2.281379e-02 -8.255437e-03 4.290160e-03 [231] -1.880420e-03 1.445799e-02 6.891845e-03 -4.051269e-03 -1.257346e-02 [236] 3.873610e-02 -7.045492e-03 9.123439e-03 2.051143e-02 4.649913e-03 [241] -5.867822e-03 2.770353e-04 1.422834e-02 -3.310649e-03 -9.194097e-03 [246] -8.801153e-03 6.832818e-03 -3.258426e-02 5.495851e-03 -1.622461e-02 [251] 1.057739e-02 2.460861e-03 -2.195776e-02 -1.386533e-02 -8.587181e-03 [256] -6.843106e-03 2.015892e-02 2.750494e-03 5.428345e-03 1.554532e-03 [261] -1.129017e-02 5.351161e-03 9.911860e-03 -6.849438e-03 -1.485091e-02 [266] 1.317642e-03 -8.694870e-03 8.705741e-03 6.465455e-03 1.113143e-02 [271] 2.899765e-02 -1.045585e-02 -4.052473e-03 3.405895e-03 3.903490e-03 [276] -1.866694e-02 -9.974802e-03 -1.540037e-02 -9.158597e-03 1.207448e-02 [281] -1.878591e-02 -5.353156e-04 2.071929e-03 1.215716e-02 -3.527559e-03 [286] -3.107794e-03 -5.106941e-03 -3.663395e-03 -2.017417e-02 1.121540e-02 [291] 2.264625e-02 1.152070e-02 7.638163e-03 3.258038e-03 -5.680365e-03 [296] 3.143290e-03 4.066957e-03 1.253507e-04 1.060415e-03 1.694998e-03 > > > > > ## additional constraints > > ## a Shapley preorder constraint matrix > ## Sh(1) - Sh(2) >= -delta.S > ## Sh(2) - Sh(1) >= -delta.S > ## Sh(3) - Sh(4) >= -delta.S > ## Sh(4) - Sh(3) >= -delta.S > ## i.e. criteria 1,2 and criteria 3,4 > ## should have the same global importances > delta.S <- 0.01 > Asp <- rbind(c(1,2,-delta.S), + c(2,1,-delta.S), + c(3,4,-delta.S), + c(4,3,-delta.S) + ) > > ## a Shapley interval constraint matrix > ## 0.3 <= Sh(1) <= 0.9 > Asi <- rbind(c(1,0.3,0.9)) > > > ## an interaction preorder constraint matrix > ## such that I(12) = I(45) > delta.I <- 0.01 > Aip <- rbind(c(1,2,4,5,-delta.I), + c(4,5,1,2,-delta.I)) > > ## an interaction interval constraint matrix > ## i.e. -0.20 <= I(12) <= -0.15 > delta.I <- 0.01 > Aii <- rbind(c(1,2,-0.2,-0.15)) > > ## an inter-additive partition constraint > ## criteria 1,2,3 and criteria 4,5 are independent > Aiap <- c(1,1,1,2,2) > > > > > > ## a more constrained solution > > lsc <- least.squares.capa.ident(5,5,C,g,Integral = "Sipos", + A.Shapley.preorder = Asp, + A.Shapley.interval = Asi, + A.interaction.preorder = Aip, + A.interaction.interval = Aii, + A.inter.additive.partition = Aiap, + sigf = 5) > > a <- lsc$solution > mu.sol <- zeta(a) > mu@data - mu.sol@data [1] 0.000000e+00 -1.811186e-01 -2.686010e-01 -2.820716e-01 1.034427e-01 [6] -3.216249e-01 -7.621138e-02 -1.965133e-01 -9.030636e-02 -1.679767e-01 [11] -1.864936e-01 -1.309987e-01 2.200329e-01 -1.360692e-01 1.093444e-01 [16] -7.992308e-02 -1.111165e-02 -8.878199e-02 -1.072989e-01 -5.180392e-02 [21] 2.992276e-01 -5.687441e-02 1.885391e-01 -7.282720e-04 2.654785e-01 [26] 2.567737e-01 2.382568e-01 2.247862e-01 6.103007e-01 1.852331e-01 [31] 3.271983e-01 -5.452577e-08 > lsc$residuals [1] 0.302233860 1.049679081 0.303109739 -0.798962690 0.861826962 [6] 0.839223037 -0.595768893 -0.029430304 0.073705129 0.411983974 [11] -1.186904652 0.104108916 0.941286508 -0.652033278 0.376398801 [16] 0.801094978 -0.346296748 -0.319174008 -0.603069891 0.558548515 [21] 0.261845541 0.436049232 -0.130378853 -0.186232249 1.889591525 [26] -1.143812721 -0.437599478 -0.054628803 0.067104883 -1.045029632 [31] 1.035158874 -0.055974592 0.209963862 -0.772023392 1.247548104 [36] -0.065545549 -0.188402261 -0.381202205 -0.612689461 -0.306569455 [41] -0.431181414 0.074949826 0.506554993 0.545378932 0.488041518 [46] -0.348409368 -0.293796564 0.132355647 -0.311144879 0.095690281 [51] -0.325324953 0.435787980 -0.203466133 0.275661238 1.008951147 [56] 1.476621114 0.332459321 0.255338226 -0.026180762 0.281265227 [61] 0.162318949 0.005456916 -0.749957160 -0.660463259 0.040145306 [66] -0.054761111 -1.111736145 0.297850105 0.040791153 0.498108429 [71] 0.647797223 -0.158066314 0.551781123 0.544437430 0.081515217 [76] 0.443156160 -0.305420005 -0.152111686 1.546778834 0.009178893 [81] 0.046815003 -0.166677873 0.472716718 -0.678785678 -0.511347508 [86] 0.204257360 0.087094849 0.636258574 -0.074239749 0.655561773 [91] -0.384657068 -0.286466037 0.047747364 -0.900997312 0.266251480 [96] -1.194523623 -0.912311459 0.566342469 -0.257520752 0.369307431 [101] 0.401080704 0.555414559 -1.357169201 -0.271128585 -0.370281073 [106] -1.742346264 0.379637453 -0.260701589 -0.718351646 0.304263326 [111] 1.824735382 -0.168011813 2.094041650 -0.838165836 -0.578909598 [116] 0.347201500 -0.142412933 0.534726786 0.374476533 -0.964290454 [121] -1.215843841 0.494208883 -0.908525094 -0.533928156 -0.251768738 [126] 0.166483516 -0.754163172 -0.635582329 -1.118199922 -0.809319684 [131] -0.589467120 -0.406844878 -0.738781267 -0.733937032 0.390099918 [136] 0.709500242 0.448662280 0.278050077 0.537985907 -0.538160564 [141] -0.725014656 0.647925692 -0.190916751 0.208351745 -0.223525516 [146] -1.914589295 0.330153168 0.262588776 -0.029377861 -0.576240310 [151] 0.325553996 0.720069180 -0.830153460 -0.515180883 -0.851187738 [156] 0.325126571 0.626229415 0.702485734 -0.155688366 0.575124430 [161] 0.382402030 0.047211436 0.538819957 -0.010966341 0.558040223 [166] 0.599753624 -0.281022148 0.306608952 0.018311853 0.315667404 [171] -0.129798762 0.049765217 -0.479656475 -0.016340766 -0.479955200 [176] -0.356120848 -0.112766469 -0.003998729 0.499422583 2.087440461 [181] 0.416475781 0.478895785 -1.025366085 -0.392483789 -0.112858680 [186] -0.333997766 -0.518897382 -0.353712173 -0.924640963 -0.823952735 [191] -0.836255768 -0.170071910 0.146661879 0.343025785 0.971485195 [196] -0.021512231 0.255745672 -0.184075605 1.570137350 0.397449023 [201] 0.295120105 -0.533272446 0.057095330 0.783851554 0.430726307 [206] 0.092396816 -0.581073660 0.203862047 0.441242154 -0.384544280 [211] -0.446729276 -1.159908676 0.165761153 -0.146858179 0.431030300 [216] 0.270806437 1.336876838 1.355270257 0.193697729 0.497112292 [221] -0.168667015 -1.071235163 0.765161492 0.339621559 -0.933917276 [226] 0.519569335 0.225947240 1.274440218 -0.228880951 -1.306985607 [231] -0.565018152 1.180005039 -0.290666624 -0.662169124 0.657982019 [236] -1.529543958 -0.352964743 -1.426985133 -0.615419975 -0.010711347 [241] 0.772364471 0.410711453 1.195717549 -0.424060021 -0.467692891 [246] 0.111020448 -0.364456045 -0.670014942 0.181580566 -0.401853782 [251] 0.098091655 -0.697368959 -0.609473893 -0.310741795 0.315859077 [256] 0.335569748 0.763653776 1.186257251 0.676175205 0.515838798 [261] 0.821649763 0.269419264 -0.254798808 -0.327774175 -0.011091193 [266] 0.032034585 -0.655911610 0.020331317 -0.122828395 -0.228394722 [271] 1.868540242 -1.169134338 -0.185677304 -0.519357542 -0.187532164 [276] -0.267961683 -0.190660897 0.578743920 0.735280053 1.084381209 [281] -0.360451738 1.805887775 -0.023939690 0.005779385 -0.302731184 [286] 0.357898642 -0.026290224 0.487175368 0.547723316 0.668020861 [291] -0.528797819 0.411610833 0.722966522 -0.062479092 -0.669272053 [296] -0.220813867 -0.096416813 0.224772426 -0.036682338 0.055157025 > summary(a) Shapley value : 1 2 3 4 5 0.3000000 0.2899999 0.1582374 0.1482374 0.1035254 Shapley interaction indices : 1 2 3 4 5 1 NA -1.500000e-01 2.615970e-01 1.595904e-08 -2.636310e-08 2 -1.500000e-01 NA -2.333395e-03 3.079355e-08 -1.090797e-08 3 2.615970e-01 -2.333395e-03 NA -1.097727e-07 -1.292678e-07 4 1.595904e-08 3.079355e-08 -1.097727e-07 NA -1.600000e-01 5 -2.636310e-08 -1.090797e-08 -1.292678e-07 -1.600000e-01 NA Orness : 0.5126841 Veto indices : 1 2 3 4 5 0.5635545 0.5298118 0.4903348 0.4404116 0.4124666 Favor indices : 1 2 3 4 5 0.5614454 0.5826881 0.4574619 0.4948851 0.4669402 Normalized variance : 0.1105306 Normalized entropy : 0.840095 > > > proc.time() user system elapsed 0.70 0.06 0.75