SampleEntropy
Sample entropy: how rarely a pattern that recurred keeps recurring.
data
entropy
- Type name
signal:SampleEntropy- Plane
signal- Tags
analysis- Language
python- Tier
in-process- Bundle
complexity- Source
node-bundles/complexity/sample_entropy.py- Availability
- available
Slots
| Slot | Direction | Type | |
|---|---|---|---|
data | input | ARRAY | |
entropy | output | ARRAY |
Parameters
sample
| Name | Type | Default | Range | Doc |
|---|---|---|---|---|
order | int | 2 | 1 … 10 | How many samples make one pattern. |
metric | string | chebyshev | chebyshev | euclidean | How far apart two patterns may be to match. |
approximate | bool | false | Count a pattern as matching itself: approximate entropy, the older biased form. |
common
| Name | Type | Default | Range | Doc |
|---|---|---|---|---|
autotrigger | bool | false | Run on the node's own schedule, instead of waiting for an input frame. Turn this on for sources; leave it off for transforms driven by their input. | |
max_frequency | float | 0 | 0 … 100 | Rate cap for this node, read through `frequency_mode`. 0 means uncapped — the node runs as often as the scheduler and its inputs allow. |
frequency_mode | string | updates_per_second | updates_per_second | seconds_per_update | How to read `max_frequency`: as a rate in Hz (updates per second), or as a period in seconds between updates — convenient for very slow nodes. |
Source
The current source of this node, as it stands in the goofi repository at node-bundles/complexity/sample_entropy.py.
"""SampleEntropy — how unpredictable a signal is, from antropy.
Counts how often a short pattern that recurred keeps recurring one sample longer; a signal that
is regular scores near 0. The last axis is time and is consumed; every axis before it survives.
"""
import antropy
import numpy as np
import goofi
class SampleEntropy(goofi.Node):
"""Sample entropy: how rarely a pattern that recurred keeps recurring."""
TAGS = ["analysis"]
INPUTS = {"data": goofi.InputSlot(goofi.DataType.ARRAY, required=True)}
OUTPUTS = {"entropy": goofi.DataType.ARRAY}
PARAMS = {
"sample": {
"order": goofi.IntParam(2, 1, 10, doc="How many samples make one pattern."),
"metric": goofi.StringParam(
"chebyshev", ["chebyshev", "euclidean"], doc="How far apart two patterns may be to match."
),
"approximate": goofi.BoolParam(
False, doc="Count a pattern as matching itself: approximate entropy, the older biased form."
),
}
}
def process(self, data):
p = self.params.sample
measure = antropy.app_entropy if p.approximate else antropy.sample_entropy
return np.apply_along_axis(
measure, -1, np.asarray(data.data, dtype=np.float64), order=p.order, metric=p.metric
).astype(np.float32)This reference describes goofi 3.1.0(537cd394), generated from a running instance on 2026-09-06.