neuralbench.transforms.SimilaritySplit¶
- pydantic model neuralbench.transforms.SimilaritySplit[source][source]¶
Perform train/val/test split based on similarity of sentence events.
Depending on the type of stimulus event that is expected, the behavior is as follows:
For Audio events, propagate sentence mapping to Word events, then chunk Audio events based on Word events.
For Keystroke events, propagate sentence mapping to Keystroke events.
For Sentence or Word events, directly apply the similarity-based split.
- Parameters:
use_sklearn_split – If True, use sklearn’s train_test_split after computing clusters, rather than using SimilaritySplitter’s deterministic cluster assignment. NOTE: valid_random_state and test_random_state are ignored unless use_sklearn_split is True.
- Fields: