Skip to content

Instantly share code, notes, and snippets.

@tnagler
Created June 29, 2022 15:30
Show Gist options
  • Save tnagler/43132f474deeced10b8cfb7ef88c0d8c to your computer and use it in GitHub Desktop.
Save tnagler/43132f474deeced10b8cfb7ef88c0d8c to your computer and use it in GitHub Desktop.

Problem statement from Alex Hayes

i have (x, y) pairs generated from two smooth curves, but i don't know which curve each point comes from

is there a way to recover the original curves?https://t.co/h9kL2JEeEV pic.twitter.com/tzy4O1VnrT

— alex hayes (@alexpghayes) June 28, 2022
library(tidyverse)

x <- seq(0, 10, length.out = 100)

unobserved <- tibble(
  x = x, 
  true_curve1 = sin(x),
  true_curve2 = tanh(x) - 0.5,
  coin = as.logical(rbinom(length(x), size = 1, prob = 0.5)),
  y1 = ifelse(coin, true_curve1, true_curve2),
  y2 = ifelse(coin, true_curve2, true_curve1)
)

observed <- unobserved |> 
  pivot_longer(
    c("y1", "y2"),
    values_to = "y"
  ) |> 
  select(x, y)

observed |> 
  ggplot(aes(x, y)) +
  geom_point() +
  labs(
    title = "How to identify which of the two curves each point belongs to?",
    subtitle = "100 data points have been generated from two smooth curves, but we only see (x, y) pairs"
  ) +
  theme_minimal()

Algorithm that minimizes curve roughness

Here, roughness means sum of squared second derivatives.

path_roughness <- function(x, y) {
  drv1 <- if (x[1] != x[2]) (y[, 2] - y[, 1]) / (x[2] - x[1]) else 0
  drv2 <- if (x[2] != x[3]) (y[, 3] - y[, 2]) / (x[3] - x[2]) else 0
  (drv2 - drv1)^2 / (x[3] - x[1])^2
}

assign_curves <- function(x, y) {
  x <- unname(unlist(x))
  y <- as.matrix(y)
  d <- ncol(y)  # number of curves
  
  # trick: first design point is replicated to allow for computing 2nd derivative
  # (which really is just 1st deriv there)
  curves <- matrix(NA, length(x) + 1, d + 1)
  curves[, 1] <- c(x[1], x)
  curves[1, -1] <- curves[2, -1] <- y[1, ]
  
  for (i in seq(2, nrow(y))) {
    # construct possible paths
    y_poss <- expand.grid(
      curves[i, -1], 
      y[i, ]
    ) 
    y_poss <- cbind(curves[i - 1, -1], as.matrix(y_poss))
    
    # roughness of each path serves as weight for the assignment problem
    roughness <- path_roughness(curves[i + seq(-1, 1), 1], y_poss)
    sol <- RcppHungarian::HungarianSolver(matrix(roughness, d, d))
    
    curves[i + 1, 1 + sol$pairs[, 1]] <- matrix(y_poss[, 3], d, d)[sol$pairs]
  }
  
  colnames(curves) <- c("x", paste0("y", 1:d))
  curves[-1, ]  # remove duplicated first design point
}

Results


# convert to wide format
observed <- observed |> 
  group_by(x) |> 
  mutate(id = paste0("V", seq_along(y))) |> 
  pivot_wider(values_from = y, names_from = id)

# run algorithm and plot
res <- assign_curves(observed[, 1], observed[, -1])
res |>
  as_tibble() |>
  pivot_longer(-x) |>
  ggplot(aes(x, value, color = name)) +
  geom_point() +
  theme_minimal()

@alexpghayes
Copy link

Real data:

    tibble::tribble(
      ~V1,               ~V2,               ~V3,               ~V4,               ~V5,               ~V6,               ~V7,               ~V8,               ~V9,              ~V10,                  ~x,
        1, 0.994959412723672, 0.994135883304029, 0.991672097897068, 0.970132857856289, 0.956659311011661, 0.931532343714854, 0.922599147314744, 0.919920263940715, 0.890081291453077,                  -2,
        1,  0.99421031510697, 0.993265125665819,  0.99043852274272, 0.969774530177377, 0.956088452698883, 0.930938896123624, 0.922054867647705, 0.919286061206556, 0.889455348404855,   -1.93939393939394,
        1, 0.993350875683552, 0.992266337307201, 0.989024532199685,  0.96936302519467, 0.955433522376048, 0.930258044544187, 0.921430507784276, 0.918558349425835, 0.888737241599869,   -1.87878787878788,
        1, 0.992365154586721, 0.991121096591282, 0.987404471698306, 0.968890535326785,  0.95468238003511, 0.929477165970219, 0.920714523463998, 0.917723596341826, 0.887913669220446,   -1.81818181818182,
        1, 0.991235008848314, 0.989808459168186, 0.985549269850316,  0.96834813390563, 0.953821209348991, 0.928581893722524,  0.91989378088726, 0.916766393286482, 0.886969494898173,   -1.75757575757576,
        1, 0.989939819521667, 0.988304653081548, 0.983426056526447, 0.967725623611746, 0.952834310538341, 0.927555901724062, 0.918953361422227, 0.915669220776398, 0.885887521771977,    -1.6969696969697,
        1, 0.988456195177177, 0.986582750101235, 0.980997761952791, 0.967011367270088, 0.951703875452237, 0.926380670223166, 0.917876349923925,  0.91441219398148, 0.884648247529822,   -1.63636363636364,
        1,  0.98675765320609, 0.984612315969799, 0.978222704530489,   0.9661920999205, 0.950409745989192, 0.925035233981626, 0.916643607663526, 0.912972787115375, 0.883229601517637,   -1.57575757575758,
        1, 0.984814281898293, 0.982359044272963,  0.97505417879372, 0.965252721369725, 0.948929158153486, 0.923495915443437, 0.915233533047354, 0.911325541699341, 0.881606667959912,   -1.51515151515152,
        1, 0.982592388306172, 0.979784381305922, 0.971440059627764, 0.964176068887995, 0.947236475563421, 0.921736046533768, 0.913621812227064, 0.909441758998548, 0.879751396206534,   -1.45454545454545,
        1, 0.980054139577979, 0.976845152732302, 0.967322444703048, 0.962942670384919, 0.945302918237136, 0.919725685499557, 0.911781168022326, 0.907289186277826, 0.877632310761759,   -1.39393939393939,
        1,  0.97715720885057, 0.973493207137903, 0.962637364127544, 0.961530479344189, 0.943096294988794,  0.91743133705474, 0.909681113013611, 0.904831702670294, 0.875214224868911,   -1.33333333333333,
        1,   0.9738544410346, 0.969675096863426, 0.959914594087798, 0.957314594577738, 0.940580750879502, 0.914815687897451, 0.907287719526968, 0.902029018412218, 0.872457975011715,   -1.27272727272727,
        1, 0.970093558973969, 0.965331822802481, 0.958066965654212, 0.951277624487904, 0.937716544893122,  0.91183737339136, 0.904563420841977, 0.898836403261968, 0.869320192760807,   -1.21212121212121,
        1, 0.965816936529049, 0.960398677127483, 0.955956100798047, 0.944443826884249, 0.934459877323434, 0.908450795621675, 0.901466863083765, 0.895204465655014, 0.865753137933784,   -1.15151515151515,
        1, 0.960961472029735, 0.954805225963118, 0.953546769433935, 0.936724906445138, 0.930762791176275, 0.904606018334811, 0.897952830603457, 0.891079009292992, 0.861704622222837,   -1.09090909090909,
        1, 0.955458603029719, 0.950799729328306, 0.948475482457041, 0.928027696218922, 0.926573176975903, 0.900248769568472, 0.893972274562677, 0.886401000913818, 0.857118060245285,   -1.03030303030303,
        1, 0.949234510907769, 0.947671485036263, 0.941328328796859, 0.921834915319421, 0.918255385466455,  0.89532058806164, 0.889472476772801,  0.88110668871507, 0.851932692046726,   -0.96969696969697,
        1, 0.944114102983198, 0.942210570857931, 0.933278252407623, 0.916488195763971, 0.907309261035502, 0.889759154254433, 0.884397386645215, 0.875127917139718, 0.846084029937881,  -0.909090909090909,
        1, 0.940075110122884, 0.934304108086643, 0.924236465305954, 0.910470053298845, 0.895091037640672, 0.883498849744796, 0.878688171072784, 0.868392689821239, 0.839504590981023,  -0.848484848484848,
        1, 0.935497509572967,  0.92542952309528, 0.914112474388903, 0.903715163676176, 0.881505834093052, 0.876471589659575, 0.872284017514215, 0.860826034358995, 0.832124992181604,  -0.787878787878788,
        1,  0.93031995270033, 0.915499845898182, 0.902816161900016, 0.896156934984984, 0.868607969030177, 0.866465819515856, 0.865123227794107, 0.852351223922545, 0.823875512052899,  -0.727272727272727,
        1, 0.924477112797698, 0.904428768765084, 0.890260416848734, 0.887728923769695, 0.859838757772541, 0.857144632362284, 0.849894503127864, 0.842891407261972, 0.814688317688142,  -0.666666666666667,
        1, 0.917900310090627, 0.892133187416202, 0.878366588702867, 0.876364327370842, 0.850096778258828, 0.848289332106774, 0.832371694192479, 0.831731572084805, 0.804500965834003,  -0.606060606060606,
        1, 0.910518440564319, 0.878536249751914, 0.868009373070901, 0.861056899327569, 0.839319379678502, 0.838502569427684, 0.820721746887503, 0.811938095890365, 0.793264582950239,  -0.545454545454545,
        1, 0.902259261286948, 0.863570868340065, 0.856603080431933, 0.844281207892903, 0.827742567836021, 0.827444676223792, 0.807878983651529, 0.790501818758146, 0.781014923051978,  -0.484848484848485,
        1,  0.89305108225447, 0.847183598822169, 0.844102480152007, 0.825998819032587, 0.815959957026615, 0.814438018034049, 0.793792895845704,  0.77294373188323, 0.770611534693538,  -0.424242424242424,
        1, 0.882824910272256, 0.830474062604129, 0.829338724250365, 0.806194242475198, 0.803141525564963, 0.800255511173261, 0.778435729750831, 0.769331355320624, 0.762486134754006,  -0.363636363636364,
        1, 0.871517088085903, 0.815698891630811, 0.810022320987442, 0.789285859621589, 0.784880349167466, 0.784879106412221, 0.765874740136415, 0.761703949900685, 0.753281568127662,  -0.303030303030303,
        1, 0.859072483422987, 0.799775714960509, 0.789246023759215, 0.774458118940986, 0.768316095000133, 0.762095689684107, 0.762072736264998, 0.743888662504983, 0.743158706057852,  -0.242424242424242,
        1, 0.845448338728206, 0.782725841255499,  0.76705016628292, 0.760082232559179, 0.756715037223391, 0.750547135238602, 0.737919421835786, 0.734690094967154, 0.731976763342969,  -0.181818181818182,
        1,  0.83061908021565, 0.764619430265519,  0.75477594302366, 0.743505960597865,  0.74120378970456, 0.731683876001714, 0.730776449692556, 0.720077455734784, 0.717102168198087,  -0.121212121212121,
        1, 0.814582981536772,  0.75095637702408, 0.745213164080829, 0.726593135896066, 0.723874169349915, 0.718716402043181, 0.713991365736672, 0.711712315016277, 0.707388561284689, -0.0606060606060606,
        1, 0.797373652945249, 0.746898375122143, 0.725302546509476, 0.721886930809714,  0.71248914635304,  0.70412390401908, 0.694839969244892, 0.692815652828708, 0.690788648409543,                   0,
        1, 0.779088422896013, 0.743018864304337, 0.716770197673649,   0.7096873107949, 0.703561104441623, 0.689403558554137, 0.684828115387721, 0.682850214856831, 0.677300285098796,  0.0606060606060605,
        1, 0.760008771210431, 0.739130120692486, 0.711360878132427, 0.705545907080739, 0.685022480633584, 0.682065019590132,  0.68042277724088, 0.665607044032267, 0.663977958777546,   0.121212121212121,
        1, 0.742002694998911, 0.733660351618175, 0.706568546578137, 0.700035343045326, 0.681343292053527, 0.677150793726826, 0.660125441247217, 0.656571124306039, 0.648184527586579,   0.181818181818182,
        1, 0.734514782765846,  0.71793578723319, 0.702640428589068,  0.69192827832215, 0.678138529775972, 0.673446291532316, 0.652739257569628, 0.642453352166209, 0.638981351254377,   0.242424242424243,
        1, 0.731115108757767, 0.702319620637918, 0.696940162956341,  0.68018490822697, 0.675028847378892, 0.669315680274845, 0.649252417637273,  0.63722946489318, 0.631379009698326,   0.303030303030303,
        1, 0.728253869983115, 0.697425417753358, 0.684731990092282, 0.672566218197902, 0.665055201269092, 0.661747533311226, 0.645821761174824, 0.632698280870618, 0.625060363848864,   0.363636363636364,
        1, 0.725645399727217, 0.694217407619521, 0.673941183743148, 0.669486339473179, 0.660091694326211, 0.642394579287012, 0.640138830497196, 0.628282919821818, 0.618920645913495,   0.424242424242424,
        1, 0.723219283209027, 0.691190391924304, 0.667661671437242, 0.662589972603169, 0.654867957013996,  0.63889749622402, 0.624794846655152, 0.616391328553679,  0.61341288522809,   0.484848484848485,
        1, 0.720944168758319, 0.688231078813522,  0.66478084604064, 0.652860132512254, 0.648812596044838,  0.63532160402993, 0.620456045776288, 0.609705967046436, 0.605786924094173,   0.545454545454545,
        1, 0.718802174150013, 0.685314967904053, 0.662104434396568, 0.645411991067039, 0.640012879234618, 0.631585290060565, 0.616221977136832, 0.606586377790453, 0.599640985355399,   0.606060606060606,
        1, 0.716782215004231, 0.682434495066332, 0.659480188335774, 0.639513726623327, 0.629763103855505, 0.627555937449976, 0.611625844664045, 0.603893105680824, 0.593680352391422,   0.666666666666667,
        1,  0.71487751946808, 0.679586387735801,  0.65688850011167, 0.634022585306036, 0.623032594324615, 0.620198064446588, 0.606047578582205, 0.601420642201338, 0.587776519223382,   0.727272727272728,
        1, 0.713084450755598, 0.676768207806614, 0.654325939445939, 0.629004175128893, 0.617764291552461, 0.612611779739723, 0.599478578872923, 0.598373880355779, 0.582739162619216,   0.787878787878788,
        1, 0.711401838345499, 0.673977261918424,  0.65179284397519, 0.624549890778979, 0.611785356052125, 0.606825113154794,  0.59697525288028, 0.590438966156126, 0.578614099505439,   0.848484848484849,
        1,  0.70983052170297, 0.671210267373126, 0.649290417572473,  0.62056247573086,  0.60581580907567, 0.601251172863715, 0.594749537058816, 0.583104329076905, 0.574463065759702,   0.909090909090909,
        1, 0.708372969685023, 0.668463237833751,  0.64681986713575, 0.616882633937287, 0.601055159773162, 0.594428345660591, 0.592385861392459, 0.577180027997352, 0.570246873705197,    0.96969696969697,
        1,  0.70703290751919, 0.665731366745613, 0.644382257242052, 0.613395067857718, 0.597366094160076, 0.590277572687009, 0.586036334136372, 0.572250699826711, 0.566021913755455,    1.03030303030303,
        1, 0.705814924001592, 0.663008810000716,  0.64197872207912, 0.610035462620334, 0.594334377779787, 0.587595318924554, 0.577483242661022, 0.567817505702108, 0.561909561104264,    1.09090909090909,
        1, 0.704724060302171, 0.660288335559383, 0.639610888868564, 0.606773050394621, 0.591836906097469, 0.584609569653714,  0.56920790423689, 0.563459562087908, 0.558492087461228,    1.15151515151515,
        1, 0.703765401193176, 0.657560854065806, 0.637281417780157,  0.60359834283103, 0.589759781114064, 0.581329315719255, 0.562862227993309, 0.558868624525752, 0.554517717692066,    1.21212121212121,
        1, 0.702943698908379, 0.654814881664595, 0.634994564448498, 0.600517682036538, 0.587967352010492, 0.577847622162965, 0.558910797661592, 0.554954159215345, 0.550809153774338,    1.27272727272727,
        1,  0.70226305875724, 0.652036015673574, 0.632756653877199, 0.597552459382546, 0.586345298991225, 0.574250810267258, 0.556043764449884, 0.551464576167973, 0.547613536084338,    1.33333333333333,
        1, 0.701726705366871, 0.649206524155462, 0.630576332390019, 0.594741521921133, 0.584802257220043, 0.570602424657233, 0.553624358977203, 0.548113052321699, 0.544552153956123,    1.39393939393939,
        1, 0.701336832229816, 0.646305161762074, 0.628464447416579, 0.592144597295166, 0.583253281702856, 0.566951770672467, 0.551378259137549, 0.545036684042964, 0.541447417424356,    1.45454545454545,
        1, 0.701094519590203, 0.643307331662966, 0.626433401570967, 0.589839756683373, 0.581611888428722, 0.563341950493962, 0.549171885227852,  0.54233476658139, 0.538178497293592,    1.51515151515152,
        1, 0.700999691332221, 0.640185732816137, 0.624495838676573, 0.587901549023436, 0.579805813760014, 0.559813468317784, 0.546930784611656, 0.539949402206854, 0.535070442222404,    1.57575757575758,
        1, 0.701051074355879, 0.636911705309829, 0.622662517962311, 0.586361368424912, 0.577812844641179, 0.556404140539012, 0.544607634582716, 0.537763913913174, 0.532643206037125,    1.63636363636364,
        1, 0.701246126189489, 0.633457741213915, 0.620939093735379, 0.585191216012168, 0.575673923246294, 0.553146312573918, 0.542173122951255,  0.53568389306029, 0.530136974905075,     1.6969696969697,
        1,  0.70158090834178, 0.629802541242334, 0.619320744549755, 0.584332228293176, 0.573461321365215, 0.550062813152048, 0.539617543558229, 0.533636754448632, 0.527432027898255,    1.75757575757576,
        1, 0.702049901810434, 0.625943818764859, 0.617779900364746, 0.583727325864547,  0.57124225973573,  0.54716375544886, 0.536959231489311, 0.531550775438573, 0.524493235425997,    1.81818181818182,
        1, 0.702645782898656, 0.621944394755481, 0.616222065051968, 0.583330427943434, 0.569065462631706,  0.54444603820847, 0.534257313214309, 0.529334388760537, 0.521316021617209,    1.87878787878788,
        1, 0.703359196684275, 0.618156142406853, 0.614265840556764,  0.58310076090519,   0.5669618030125, 0.541895876076206, 0.531612788164843, 0.526871483587066, 0.517930861149298,    1.93939393939394,
        1, 0.704178577234281, 0.615552980810329, 0.610917066979598, 0.582993278204455, 0.564946908779521, 0.539493117412345, 0.529116285949253, 0.524073626759615, 0.514415938384115,                   2,
        1, 0.705090065034644, 0.613998301414756, 0.606314484673617, 0.582946794872213, 0.563021163024614, 0.537215387852773, 0.526764387471847, 0.520966974645542, 0.510916962438895,    2.06060606060606,
        1, 0.706077563082245, 0.612754320958277, 0.601248225222584, 0.582861482666976, 0.561166691766462, 0.535040094849594, 0.524469983200876, 0.517686806969554, 0.507656085366558,    2.12121212121212,
        1, 0.707122956412813, 0.611581855755431, 0.596133385736919, 0.582534635169529,  0.55934211660881, 0.532943266770868, 0.522136120071009, 0.514404910655892, 0.504840689085918,    2.18181818181818,
        1,  0.70820649990749, 0.610395145100689, 0.591559918302573, 0.581468934100061, 0.557475556018347, 0.530896210882345, 0.519690010877632, 0.511282118326739,  0.50245860504218,    2.24242424242424,
        1, 0.709307360414756, 0.609148734508861, 0.588522675072689, 0.578772656110825, 0.555455836579036, 0.528862617482144, 0.517082693429738, 0.508431156257392, 0.500311036045396,     2.3030303030303,
        1, 0.710404284466345, 0.607816264418155, 0.587132195424805, 0.574488191162134,  0.55312478987874, 0.526798142519354,  0.51427988318815, 0.505879466473615, 0.498224747163584,    2.36363636363636,
        1, 0.711476352929175, 0.606386885783529,  0.58643716206228,  0.56977277567323, 0.550289199407376,  0.52465218640691, 0.511252481462389, 0.503565023235673, 0.496097242972817,    2.42424242424242,
        1, 0.712503777725251, 0.604865366185374, 0.585852455899866, 0.565402796153281,  0.54679934990234, 0.522370184030627, 0.507969683047229,  0.50137442142401, 0.493854273222928,    2.48484848484849,
        1, 0.713468691364609, 0.603271767937086, 0.585128169498915, 0.561660591311097, 0.542700201668006, 0.519895855618075, 0.504397198305432, 0.499186036476792,   0.4914261745123,    2.54545454545455,
        1, 0.714355876141333, 0.601638086176365, 0.584132038567363, 0.558490163793298, 0.538290690049592,  0.51717623540282, 0.500504781887883, 0.496893712762254, 0.488743774262502,    2.60606060606061,
        1, 0.715153376791382, 0.600000065242761,  0.58278295255581, 0.555690431097704, 0.533974749269886, 0.514175230474415, 0.496290934290401, 0.494416812153612, 0.485730703068817,    2.66666666666667,
        1, 0.715852940554209,  0.59838533356892, 0.581039605153697, 0.553074323386398,  0.53006960844478, 0.510895269297645, 0.491886628229473, 0.491648524897477, 0.482283340626684,    2.72727272727273,
        1, 0.716450235482012, 0.596803559439372, 0.578901946200712,  0.55051833101729, 0.526716583551495, 0.507387152503356, 0.488797802578716, 0.487258502964067, 0.478256064953731,    2.78787878787879,
        1, 0.716944814517775, 0.595245173433945, 0.576408443365446, 0.547954505936892, 0.523898460143585, 0.503728012929646, 0.485661884501969, 0.482886699838057, 0.473519210068379,    2.84848484848485,
        1, 0.717339819689975,  0.59368904656262, 0.573625454965094, 0.545352715270715, 0.521511614937308, 0.499986996140622,  0.48238983324148, 0.478828220543956,   0.4694060176318,    2.90909090909091,
        1, 0.717641454114147, 0.592113044105629, 0.570633614483382, 0.542706750048967, 0.519431077798576, 0.496211646218692,  0.47905659800957, 0.475064984592524, 0.467106650591629,    2.96969696969697,
        1, 0.717858282056507, 0.590501635357201, 0.567516643336295,  0.54002490592923, 0.517544273098832, 0.492434782580734, 0.475741329482876, 0.471511416437138, 0.464449752420192,    3.03030303030303,
        1, 0.718000440470297, 0.588848959421305, 0.564354158286916, 0.537323608446163, 0.515762502840362, 0.488684617419695, 0.472511748942165, 0.468088153126905, 0.461489449462518,    3.09090909090909,
        1, 0.718078852608306, 0.587158562197567, 0.561217457290428, 0.534623061417382,  0.51402281537523, 0.484989790362846, 0.469411205196938,  0.46474234686946, 0.458319247829767,    3.15151515151515,
        1, 0.718104523872928, 0.585441468330728, 0.558166988578956, 0.531944408878858, 0.512286369460693, 0.481379871139773, 0.466455756070111, 0.461456644286635, 0.455041300945551,    3.21212121212121,
        1, 0.718087975874611, 0.583713725763949, 0.555250840522244, 0.529308129086103, 0.510535221046435, 0.477883841450244, 0.463644293378195, 0.458244309261273, 0.451745803094764,    3.27272727272727,
        1, 0.718038844374943, 0.581994021629045, 0.552504133527655, 0.526733362979823, 0.508768118685591, 0.474528228506955,    0.460971928551, 0.455133402972174, 0.448503969439601,    3.33333333333333,
        1, 0.717965638583091, 0.580301641542292, 0.549949386133693, 0.524237775012707, 0.506995743782784, 0.471335614080144, 0.458437114682314, 0.452153286559524, 0.445368970886733,    3.39393939393939,
        1, 0.717875638982713, 0.578654876146181, 0.547597832635139, 0.521837524739861, 0.505235943137367, 0.468323718045705, 0.456042324433615, 0.449328152262655, 0.442378984946058,    3.45454545454546,
        1, 0.717774900614367, 0.577069892045203, 0.545451457599139, 0.519547069862021, 0.503509510338436,  0.46550503042732,  0.45379204849502, 0.446675273718767, 0.439560085035564,    3.51515151515152,
        1, 0.717668327360344,  0.57556003554251, 0.543505354046779, 0.517378753483055, 0.501836909509189, 0.462886886441616, 0.451690657951699, 0.444205261970057, 0.436928585621063,    3.57575757575758,
        1, 0.717559787286611, 0.574135508833822, 0.541750000634841, 0.515342310103541, 0.500236082858458, 0.460471861282895, 0.449740973306675, 0.441922954185366, 0.434492953589257,    3.63636363636364,
        1, 0.717452246244179, 0.572803343285691,  0.54017317293901, 0.513444475438301, 0.498721259025912, 0.458258368820985, 0.447943571112096, 0.439828418066384, 0.432255416260773,     3.6969696969697,
        1, 0.717347904237512, 0.571567590373132,  0.53876137148873, 0.511688826268731,  0.49730254867922, 0.456241366003154, 0.446296630768265, 0.437917922450225, 0.430213347197543,    3.75757575757576,
        1, 0.717248325146551, 0.570429655339133, 0.537500786094257, 0.510075880729272, 0.495986078764848, 0.454413085868941, 0.444796116075391, 0.436184821456563, 0.428360460109091,    3.81818181818182,
        1, 0.717154554796322, 0.569388708896387, 0.536377889254479, 0.508603414584847, 0.494774443826052, 0.452763743215168, 0.443436133924693,  0.43462033982873, 0.426687829211324,    3.87878787878788,
        1, 0.717067225239774, 0.568442125529597,  0.53537976854807, 0.507266914842121, 0.493667305634682, 0.451282176062052, 0.442209362823417, 0.433214252121546, 0.425184745162137,    3.93939393939394,
        1, 0.716986644831064, 0.567585910803524, 0.534494292675182, 0.506060091145054, 0.492662026904469, 0.449956402061228, 0.441107483502785,  0.43195545453016, 0.423839416951671,                   4
      )

@tnagler
Copy link
Author

tnagler commented Jun 29, 2022

Results:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment