Skip to content

Commit

Permalink
fixes tib labelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Trybnetic committed Sep 11, 2024
1 parent 801899c commit 22b66e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paat/sleep.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def detect_time_in_bed_weitz2024(data, sample_freq, resampled_frequency="1min",
model_path = os.path.join(os.path.pardir, os.path.dirname(__file__), 'models', 'TIB_model.h5')
model = models.load_model(model_path)

predictions = (model.predict(X[np.newaxis], verbose=0).squeeze() < .5)
predictions = (model.predict(X[np.newaxis], verbose=0).squeeze() >= .5)

seconds = pd.Timedelta(resampled_frequency).seconds
predictions = np.repeat(predictions, seconds * sample_freq)
Expand Down

0 comments on commit 22b66e4

Please sign in to comment.