eaf#

moocore.eaf(data, /, sets, *, percentiles=[])[source]#

Exact computation of the Empirical Attainment Function (EAF).

See also

For the definition of EAF, see EAF Computation.

Parameters:
  • data (ArrayLike) – Matrix of numerical values that represents multiple sets of points, where each row represents a point.

  • sets (ArrayLike) – Vector that indicates the set of each point in data.

  • percentiles (list, default: []) – List indicating which percentiles are computed. By default, all possible percentiles are calculated.

Returns:

ndarray – EAF data points, with the same number of columns as the input argument, but a different number of rows. The last column represents the EAF percentile for that data point.

See also

mooplot.plot_eaf

Plotting the EAF.

Notes

In the current implementation, the EAF is computed using the algorithms proposed by Fonseca et al.[1], which have complexity \(O(m\log m + nm)\) in 2D and \(O(n^2 m \log m)\) in 3D, where \(n\) is the number of input sets and \(m\) is the total number of input points.

References

Examples

>>> x = moocore.get_dataset("input1.dat")
>>> moocore.eaf(x[:, :-1], x[:, -1])  
array([[  0.17470556,   8.89066343,  10.        ],
       [  0.20816431,   4.62275469,  10.        ],
       [  0.22997367,   1.11772205,  10.        ],
       [  0.58799475,   0.73891181,  10.        ],
       [  1.54506255,   0.38303122,  10.        ],
       [  8.57911868,   0.35169752,  10.        ],
       [  0.20816431,   8.89066343,  20.        ],
       [  0.2901393 ,   8.32259412,  20.        ],
       ...
       [  9.78758589,   2.8124162 ,  90.        ],
       [  1.13096306,   9.72645436, 100.        ],
       [  2.71891214,   8.84691923, 100.        ],
       [  3.34035397,   7.49376946, 100.        ],
       [  4.43498452,   6.94327481, 100.        ],
       [  4.96525837,   6.20957074, 100.        ],
       [  7.92511295,   3.92669598, 100.        ]])
>>> moocore.eaf(x[:, :-1], x[:, -1], percentiles=[0, 50, 100])  
array([[  0.17470556,   8.89066343,   0.        ],
       [  0.20816431,   4.62275469,   0.        ],
       [  0.22997367,   1.11772205,   0.        ],
       [  0.58799475,   0.73891181,   0.        ],
       [  1.54506255,   0.38303122,   0.        ],
       [  8.57911868,   0.35169752,   0.        ],
       [  0.53173087,   9.73244829,  50.        ],
       [  0.62230271,   9.02211752,  50.        ],
       [  0.79293574,   8.89066343,  50.        ],
       [  0.9017068 ,   8.32259412,  50.        ],
       [  0.97468676,   7.65893644,  50.        ],
       [  1.06855707,   7.49376946,  50.        ],
       [  1.54506255,   6.7102429 ,  50.        ],
       [  1.5964888 ,   5.98825094,  50.        ],
       [  2.16315952,   4.7394435 ,  50.        ],
       [  2.85891341,   4.49240941,  50.        ],
       [  3.34035397,   2.89377444,  50.        ],
       [  4.61023932,   2.87955367,  50.        ],
       [  4.96525837,   2.29231998,  50.        ],
       [  7.04694467,   1.83484358,  50.        ],
       [  9.7398055 ,   1.00153569,  50.        ],
       [  1.13096306,   9.72645436, 100.        ],
       [  2.71891214,   8.84691923, 100.        ],
       [  3.34035397,   7.49376946, 100.        ],
       [  4.43498452,   6.94327481, 100.        ],
       [  4.96525837,   6.20957074, 100.        ],
       [  7.92511295,   3.92669598, 100.        ]])