Skip to content
Snippets Groups Projects
Commit db8244ef authored by David Schäfer's avatar David Schäfer
Browse files

Merge branch 'develop' of https://git.ufz.de/rdm-software/saqc into develop

parents 07d5251f 6765f1fc
No related branches found
No related tags found
6 merge requests!685Release 2.4,!684Release 2.4,!567Release 2.2.1,!566Release 2.2,!501Release 2.1,!400Relase 2.0.1
Pipeline #56286 failed with stages
in 3 minutes and 15 seconds
......@@ -101,8 +101,13 @@ def assignKNNScore(
----------
[1] https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.NearestNeighbors.html
"""
if target in data.columns:
raise ValueError(f"'target' must not exist.")
if isinstance(target, list):
if (len(target) > 1) or (target[0] in data.columns):
raise ValueError(
f"'target' must not exist and be of length 1. {target} was passed instead."
)
target = target[0]
fields = toSequence(field)
val_frame = data[fields].copy()
score_index = val_frame.index_of("shared")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment