Skip to content

Package: feature_extraction

Feature extraction algorithms and related nodes.

These nodes extract certain kinds of latent features from data, which is generally expected to have an axis that indexes the observations (e.g., instance) and one or more other axes that index the input and output data spaces. Most operations can be configured in terms of one or more axis to aggregate statistics over (e.g., instance or time), one or more axis to treat as the "feature space" (e.g., feature or space) and optionally one or more axes along which to process data independently and in parallel (for example, using the space axis to calculate one separate PCA per each channel). The learned model can also be read or written (e.g., when reloading a previousl saved model) via the .model port. Unlike many nodes in NeuroPype, feature extraction nodes are stateful, meaning that they can adapt themselves to the data that they receive and then use their internal state to process subsequent data. Typically the adaptation happens the first time the node is invoked on a data packet, and the model is then frozen for subsequent usage. However, note that when such nodes are used in conjunction with graph-accepting nodes such as in function definitions (FunctionDef/FunctionCall) or in loop bodies (e.g., with ForEach), some of the latter nodes will clear the state on each subsequent update unless configured to behave in a stateful or "materialized" way). This can be useful for establishing controlled train/test cycles where state is used only in a limited context until it is reset. Due to the unspecific nature of these nodes (e.g. PCA), these are not necessarily building blocks of optimal end-to-end processing workflows, but they can be very powerful in building straightforward solutions that work well enough in practice.

Nodes in this package: