Issues with GIEX fit and two comparators

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?

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.

1 Like

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

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