# Issues with GIEX fit and two comparators

**URL:** <https://forum.cadet-web.de/t/issues-with-giex-fit-and-two-comparators/1411>\
**Category:** CADET Troubleshooting\
**Created:** [March 16, 2026, 3:24pm UTC](https://forum.cadet-web.de/t/issues-with-giex-fit-and-two-comparators/1411 "2026-03-16T15:24:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoritzImendoerffer](https://forum.cadet-web.de/letter_avatar_proxy/v4/letter/m/48db29/32.png) [@MoritzImendoerffer](https://forum.cadet-web.de/u/MoritzImendoerffer)\
**Post date:** [March 16, 2026, 3:24pm UTC](https://forum.cadet-web.de/t/issues-with-giex-fit-and-two-comparators/1411/1 "2026-03-16T15:24:18Z")

</div>

### Expected behavior.

I can combine e.g. NRMSE and PeakPosition as metrics for the fit.

### Actual behavior

When using peak position and NRMSE together, I get an error in reduction.py from PyMoo

```
def _do(self, random_state=None):
    rnd = sample_on_unit_simplex(self.n_sample_points, self.n_dim, random_state=random_state, unit_simplex_mapping=self.sampling)

    def h(n):
        return get_partition_closest_to_points(n, self.n_dim)

    H = h(self.n_points)

    E = UniformReferenceDirectionFactory(self.n_dim, n_partitions=H).do()
    E = E[np.any(E == 0, axis=1)]

    # add the edge coordinates
    X = np.vstack([E, rnd])

    I = select_points_with_maximum_distance(X, self.n_points, selected=list(range((len(E)))))
    centroids = X[I].copy()

    if self.kmeans:
        #centroids = kmeans(X, centroids, self.kmeans_max_iter, self.kmeans_a_tol, 0)
        centroids = kmeans(X, centroids, self.kmeans_max_iter, self.kmeans_a_tol, len(E))

    return centroids

```

`E` consists of the same data points without variation and therefore `E = E[np.any(E == 0, axis=1)]` is empty and as a consequence the function call to `select_points_with_maximum_distance` fails

### How to produce bug (including a minimal reproducible example)

Unfortunately, I canot share the full example and it is hard for me to reproduce the bug. With data at constant pH, I can use both loss functions and GIEX fits well. If I add about 4 additional runs with varying pH conditions, I can only use either NRMSE or PeakPosition.

I will try to set up a minimal working example which I can share. In the meantime, do you have any ideas what might be the reason?

---

<div class="post-metadata">

**Author:** ![MoritzImendoerffer](https://forum.cadet-web.de/letter_avatar_proxy/v4/letter/m/48db29/32.png) [@MoritzImendoerffer](https://forum.cadet-web.de/u/MoritzImendoerffer)\
**Post date:** [March 18, 2026, 9:37am UTC](https://forum.cadet-web.de/t/issues-with-giex-fit-and-two-comparators/1411/2 "2026-03-18T09:37:06Z")

</div>

In case anyone stumbles across the same issue. I did increase the bounds (initially I had many bounds set to -1,1 for the pH dependence) and now it is working properly with both comparators.

I am not sure, if I will try to create a minimal working example. I guess this is a very rare case.

---

<div class="post-metadata">

**Author:** ![h.lanzrath](https://forum.cadet-web.de/user_avatar/forum.cadet-web.de/h.lanzrath/32/1186_2.png) [@h.lanzrath](https://forum.cadet-web.de/u/h.lanzrath)\
**Post date:** [March 23, 2026, 4:21pm UTC](https://forum.cadet-web.de/t/issues-with-giex-fit-and-two-comparators/1411/3 "2026-03-23T16:21:54Z")

</div>

Hi Moritz,

Great to hear that you were able to solve the issue! An MRE would still be much appreciated so we can check whether there is anything on our side that could be made more robust to prevent this issue from arising in the future.

Best,  
Hannah

---

<div class="post-metadata">

**Author:** ![system](https://forum.cadet-web.de/uploads/default/original/2X/4/4ec43a357aeb35dcb4e6620649f54e8e6591b258.png) [@system](https://forum.cadet-web.de/u/system)\
**Post date:** [April 6, 2026, 4:22pm UTC](https://forum.cadet-web.de/t/issues-with-giex-fit-and-two-comparators/1411/4 "2026-04-06T16:22:52Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
