How to use the braindecode.datautil.trial_segment._create_signal_target_from_start_and_ival function in braindecode

To help you get started, we’ve selected a few braindecode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TNTLFreiburg / braindecode / test / unit_tests / datautil / test_trial_segment.py View on Github external
def check_signal_target_from_start_and_ival(data, events, fs, name_to_codes,
                                           epoch_ival_ms, expected_X, expected_y):
    data = np.array(data)
    events = np.array(events)
    name_to_codes = OrderedDict(name_to_codes)
    out_set = _create_signal_target_from_start_and_ival(
        data, events, fs, name_to_codes, epoch_ival_ms,
        one_hot_labels=False, one_label_per_trial=True)
    np.testing.assert_array_equal(out_set.y, expected_y)
    np.testing.assert_allclose(out_set.X, expected_X)