Commit 70624173 authored by lucas_miranda's avatar lucas_miranda
Browse files

Implemented outlier interpolation

parent 6809805a
Pipeline #92723 passed with stage
in 28 minutes and 24 seconds
...@@ -961,8 +961,8 @@ class table_dict(dict): ...@@ -961,8 +961,8 @@ class table_dict(dict):
).reshape(X_train.shape) ).reshape(X_train.shape)
if scale == "standard": if scale == "standard":
assert np.allclose(np.mean(X_train), 0) assert np.allclose(np.nan_to_num(np.mean(X_train), nan=0), 0)
assert np.allclose(np.std(X_train), 1) assert np.allclose(np.nan_to_num(np.std(X_train), nan=1), 1)
if test_videos: if test_videos:
X_test = scaler.transform(X_test.reshape(-1, X_test.shape[-1])).reshape( X_test = scaler.transform(X_test.reshape(-1, X_test.shape[-1])).reshape(
...@@ -1124,3 +1124,5 @@ def merge_tables(*args): ...@@ -1124,3 +1124,5 @@ def merge_tables(*args):
# - with the current implementation, preprocess can't fully work on merged table_dict instances. # - with the current implementation, preprocess can't fully work on merged table_dict instances.
# While some operations (mainly alignment) should be carried out before merging, others require # While some operations (mainly alignment) should be carried out before merging, others require
# the whole dataset to function properly. # the whole dataset to function properly.
# - Understand how keras handles NA values. Decide whether to do nothing, to mask them or to impute them using
# a clear outlier (e.g. -9999)
...@@ -660,7 +660,9 @@ def tag_rulebased_frames( ...@@ -660,7 +660,9 @@ def tag_rulebased_frames(
(int(coords[bpart]["x"][fnum]), int(coords[bpart]["y"][fnum])), (int(coords[bpart]["x"][fnum]), int(coords[bpart]["y"][fnum])),
radius=3, radius=3,
color=( color=(
(255, 0, 0) if bpart.startswith(animal_ids[0]) else (0, 0, 255) (255, 0, 0)
if bpart.startswith(animal_ids[0])
else (0, 0, 255)
), ),
thickness=-1, thickness=-1,
) )
......
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