Skip to content
Snippets Groups Projects
Commit ca0bf62a authored by Cain, Payton David's avatar Cain, Payton David
Browse files

Support variable length list in filter_iqrs

parent 2104d19b
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!58Affine running process
...@@ -203,11 +203,14 @@ def filter_iqrs( ...@@ -203,11 +203,14 @@ def filter_iqrs(
threshold: float = 3.0, threshold: float = 3.0,
) -> List[float]: ) -> List[float]:
"""Filters "bad" weights generated by unreliable readings""" """Filters "bad" weights generated by unreliable readings"""
good = ( good = None
filter_iqr(multiseries[0], threshold=threshold, weights=weights) for series in multiseries:
& filter_iqr(multiseries[1], threshold=threshold, weights=weights) filtered = filter_iqr(series, threshold=threshold, weights=weights)
& filter_iqr(multiseries[2], threshold=threshold, weights=weights) if good is None:
) good = filtered
else:
good = good & filtered
return weights * good return weights * good
......
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