FusePredictionsAndMarkers¶
""Fuse a BCI's predictions and some markers together into a stream that can be evaluated by MeasureLoss.
This node can be used to rejoin a stream of numeric predictions that were generated in response to event markers (e.g., in a standard machine-learning setup involving marker-locked segmentation followed by feature extraction and an ML node) with a second stream that holds the original event markers. The node copies any per-marker metadata (in the instance axis of the marker stream) to the instance axis of the predictions stream. The underlying assumption of the node is that the predictions have the same or sufficiently similar per-instance time stamps as the event markers to allow for unambiguous matching. Crucially, the node seamlessly handles predictions that arrive much later, in a wallclock sense, than the event markers (despite being labeled with the original time stamps), which is typical when the predictions depend on data that lags the event markers by several seconds (e.g., because the segment extracted relative to an event marker extends into the future). This node can be used, for example, in simulated-online test setups where a BCI pipeline's marker-locked outputs are checked against known ground truth event markers. The resulting stream can be fed into MeasureLoss (or other nodes) to evaluate for instance the accuracy of the predictions. Note that this node considers only event markers that have their TargetValue field set, i.e., you should have called AssignTargetMarkers on your marker stream prior to feeding into this node, in order to select the subset of markers that should have generated predictions. Version 1.0.0
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
max_delay¶
Max delay of predictions with respect to markers. We assume that predictions cannot appear later than this following a time-locking event marker.
- verbose name: Max Delay
- default value: 2
- port type: FloatPort
- value type: float (can be None)
min_delay¶
Min delay of predictions with respect to markers. We assume that predictions cannot appear earlier than this following a time-locking event marker.
- verbose name: Min Delay
- default value: -2
- port type: FloatPort
- value type: float (can be None)
warn_tolerance¶
Max timing tolerance. Will warn if the discrepancy in time stamp between prediction and marker was larger than this value. This can be used to catch unexplained discrepancies in logical timing, as well as possible overlap of multiple (perhaps unexpected) candidate event markers or predictions, resulting in possible ambiguity.
- verbose name: Warn Tolerance
- default value: 0.1
- port type: FloatPort
- value type: float (can be None)
drop_delay¶
Drop markers older than this. Any event markers that were not successfully associated with a prediction and which are too old will be dropped (and a warning will be generated).
- verbose name: Drop Delay
- default value: 30
- port type: FloatPort
- value type: float (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)