interval_generator — Fixed and overlapping interval expansion

Group: Signal transforms · C ABI: n4m_feature_selection_interval_generator_*

Description

Generate fixed or overlapping wavelength intervals.

Parameters

Name

Type

Default

interval_size

int

32

step

int | None

None

API and bindings

C ABI (ABI 2): n4m_feature_selection_interval_generator_create · n4m_feature_selection_interval_generator_destroy · n4m_feature_selection_interval_generator_fit · n4m_feature_selection_interval_generator_is_fitted · n4m_feature_selection_interval_generator_output_cols · n4m_feature_selection_interval_generator_transform · n4m_feature_selection_interval_select. Use the linked public header for the exact signature, configuration, and result handles.

Python (verified public re-export):

from n4m.feature_selection.interval import IntervalGenerator

Source signature: IntervalGenerator(interval_size: int = 32, step: int | None = None).

R (source-verified): interval_select(X, Y, n_components, interval_width = 10L, step = 1L).

The source signature has additional required inputs, so no example call is fabricated.

MATLAB / Octave (source-verified): interval_select(X, Y, n_components, interval_width, step).

The source signature has additional required inputs, so no example call is fabricated.

Explanations

Bibliographic source

No canonical paper: this is a deterministic interval-construction and column-copy operation; interval_fit is its normative definition.

Mathematical principle

Fit creates half-open bands of width interval_size starting every step columns (step=interval_size by default), truncating the last band at the feature count. Transform concatenates every band, so overlapping columns are deliberately repeated.

Appropriate uses

Building interval blocks for downstream interval selection or block-wise models, with optional overlap.

Limits and validation

It does not score or select intervals. Overlap increases output dimension and repeats features, while position indices assume an already aligned common wavelength grid.

Implementation

n4m.feature_selection.interval.IntervalGenerator and interval_generator use n4m_feature_selection_interval_generator_*; construction/copying are in cpp/src/c_api/c_api_advanced.cpp.

The ABI-2 implementation is the n4m_feature_selection_interval_generator_* lifecycle in libn4m.

Sources and provenance

https://github.com/GBeurier/nirs4all-methods/blob/main/cpp/src/c_api/c_api_advanced.cpp#L1225-L1303


See also: methods index · interactive dashboard