neuralset.extractors.meta.CroppedExtractor¶
- pydantic model neuralset.extractors.meta.CroppedExtractor[source][source]¶
Crop a extractor to a given offset and duration.
- Parameters:
extractor (BaseExtractor) – The extractor to crop.
offset (float) – The offset (in seconds) from the start of the event to begin the crop.
duration (PositiveFloat | None) – The duration (in seconds) of the crop. If None, the crop extends to the end of the event.
frequency (Literal["native"]) – The frequency of the cropped extractor. Must be “native”. Never used
- Fields:
- field extractor: BaseExtractor [Required][source]¶
- prepare(obj: Any) None[source][source]¶
Pre-compute and cache extractor data for a collection of events.
This method triggers
_get_dataon every matching event so that expensive computation (e.g. model inference) is done once and cached. It then calls the extractor on a single event to populate the output shape, which is needed whenallow_missing=True.Call
preparebefore using the extractor in a dataloader.