Commit d58c62dd authored by Artem Pulkin's avatar Artem Pulkin

ml: change warning in accordance with the new defaults

parent 28d1f541
......@@ -1585,10 +1585,10 @@ def kernel_u_nn(kind, r_indptr, r_indices, r_data, cartesian_row, cartesian_col,
# Scale descriptors
if normalization:
normalization.fw_features(descriptor_values, normalization_handle, inplace=True)
n_invalid = (descriptor_values < 0).sum() + (descriptor_values > 1).sum()
n_invalid = (descriptor_values < -1).sum() + (descriptor_values > 1).sum()
if n_invalid:
warn(f"{n_invalid:d} ({100.0 * n_invalid / descriptor_values.nelement():.0f}%) descriptors exceed the "
f"[0, 1] interval after normalization. This likely means that the fit is extrapolating.",
f"[-1, 1] interval after normalization. This likely means that the fit is extrapolating.",
PotentialRuntimeWarning)
if do_grad:
normalization.fw_features_g(descriptor_gradient_values, normalization_handle, inplace=True)
......
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