Steps 5 and 6: pre-trained M2 passes the criterion for Obstruction, not for Visibility; episodes and sensors (decode.py)
m2.py: one thread per process, --test to share the stations left out between processes, --out on the time split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5337dd0dac
commit
4836929bc7
4 files changed
+212
-42
No files matched your search
@@ -0,0 +1,13 @@
|
||||
"""Checks of decode.py: python test_decode.py."""
|
||||
import numpy as np
|
||||
|
||||
import decode
|
||||
|
||||
assert decode.episodes(np.array([0, 1, 1, 0, 1, 0, 0, 1])) == [[1, 4], [7, 7]] # one instant bridged, two not
|
||||
assert decode.named("PB1_2 alone, unlike PB1 and PB2_2.", ["PB1", "PB1_2", "PB2", "PR12"]) == [0, 1]
|
||||
instants = np.array(["t0", "t1", "t2", "t3", "t4", "t5"])
|
||||
yhat = np.zeros((6, 1), np.uint8)
|
||||
yhat[1:3, 0] = 1
|
||||
c = decode.score_station([{"start": "t2", "end": "t3"}, {"start": "t5", "end": "t5"}], instants, yhat, 0)
|
||||
assert c[:4] == [2, 1, 1, 1] and c[4] == [1 / 3], c # label t2..t3 and episode t1..t2 share t2 of t1..t3
|
||||
print("ok")
|
||||
Reference in new issue
Block a user