Commit 84be9fe5 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed 'Exception: Weights sum to zero, can't be normalized'.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 8bcfa8df
Pipeline #25967 failed with stage
in 48 minutes and 18 seconds
......@@ -513,7 +513,7 @@ class RSImage_ClusterPredictor(object):
distNorm2d = (dist2d - dist_min) /\
(dist_max - dist_min)
weights2d = 1 - distNorm2d
weights2d[weights2d < 0] = 1e-10 # set negative weights to 0 but avoid ZeroDivisionError
weights2d[weights2d <= 0] = 1e-5 # set negative weights to 0 but avoid ZeroDivisionError
# make sure that the global regressor is only counted once when predicting the output spectra
# - since there may be multiple regressors that exceed the global_clf_threshold,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment