Pareto Rank Distribution (distr_Par)

import math

from pyxla import distr_Par
from pyxla.util import load_data
from pyxla.sampling import HilbertCurveSampler
sphere_sample = {
    "name": "Sphere",
    "X": HilbertCurveSampler(sample_size=100, dim=1, l_bound=-5, u_bound=5, seed=42),
    "F": lambda x: x**2,
    "V": [lambda x: x**2 - 2, lambda x: 8 * math.sin(20 * x)]
}

deceptive_sample = {
    "name": "Deceptive",
    "X": HilbertCurveSampler(sample_size=100, dim=1, l_bound=0, u_bound=6),
    "F": lambda x: (0.4 * x - 2) ** 2 if x > 0.625 else (10 * x - 4) ** 2 - 2,
    "V": lambda x: ((0.4 * x - 2) ** 2 if x > 0.625 else (10 * x - 4) ** 2 - 2) - 1
}

load_data(sphere_sample)
load_data(deceptive_sample)
WARNING:root:The Hilbert curve with dimension 1 is just a number line. You are sampling around points on a number line.
WARNING:root:The Hilbert curve with dimension 1 is just a number line. You are sampling around points on a number line.
distr_Par(sphere_sample)
({'paretoV_min': 1,
  'paretoV_max': 40,
  'paretoV_mean': 16.5,
  'paretoV_med': 14.0,
  'paretoV_q1': 6.0,
  'paretoV_q3': 26.75,
  'paretoV_sd': 12.132683965307107,
  'paretoV_skew': 0.36083900012368475,
  'paretoV_kurt': -1.092331393135496,
  'paretoFV_min': 1,
  'paretoFV_max': 54,
  'paretoFV_mean': 27.33,
  'paretoFV_med': 26.5,
  'paretoFV_q1': 14.0,
  'paretoFV_q3': 40.75,
  'paretoFV_sd': 15.446914634229442,
  'paretoFV_skew': 0.04168327649182093,
  'paretoFV_kurt': -1.1827672534307703},
 <Figure size 600x300 with 2 Axes>)
../../_images/72d7c11df4e0c9e5dd8e0dfaf3717c00ddca81370dfe7f999f111372279578fd.png
distr_Par(deceptive_sample)
({'paretoFV_min': 1,
  'paretoFV_max': 100,
  'paretoFV_mean': 50.5,
  'paretoFV_med': 50.5,
  'paretoFV_q1': 25.25,
  'paretoFV_q3': 75.75,
  'paretoFV_sd': 29.011491975882016,
  'paretoFV_skew': 0.0,
  'paretoFV_kurt': -1.2002400240024003},
 <Figure size 300x300 with 1 Axes>)
../../_images/8d8daaa44f9b992d538dfaf97c683410d57d6ee48aa80862a6291e350ba227e1.png