Histogram¶
Compute a histogram of data for each element along a given axis.
All data for each element along the selected axis will be collapsed into a single array on which the histogram will be computed. (I.e., if the packet with computed PSD has a space axis with channels, a feature axis with 'alpha' and 'beta' bands, and a time axis, and 'feature' is specified in this node as the 'axis' property, a histogram will be computed over all channels and time points for the 'alpha' band, and separately for the 'beta' band. If a histogram is desired for a single channel, use SelectRange prior to this node.) By default the histogram is computed cumulatively over all data received so far, unless cumulative is set to False. (For non-streaming data, the entire dataset is in a single packet so this doesn't apply either way.) This node can either output the bin counts, or the bin frequency densities (see computed_value property). A new Statistic axis named 'histogram' is created, with the bin edges (3 decimal precision) as its labels, and the bin sums in the data tensor for each element. The histogram is computed for all samples in the Packet (in the case of non-streaming data, this would be the entire data set). In the output Packet, all axes except the axis for which the histograms were computed (i.e., feature in the above example) will be dropped, and the new Statistic axis will be added. The output Packet data tensor will hold the histogram data only. More Info... Version 0.9.1
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
computed_value¶
Whether the computed values are the counts of each bin, or the frequency densities (samples in each bin / total samples). The latter may not sum to exactly 1 due to floating values.
- verbose name: Computed Value
- default value: count
- port type: EnumPort
- value type: str (can be None)
axis¶
A histogram will be calculated for each element in this axis.
- verbose name: Axis
- default value: feature
- port type: EnumPort
- value type: str (can be None)
min_value¶
Minimum value to include in the histogram. If None, the minimum value in the data will be used (non-streaming only).
- verbose name: Min Value
- default value: 0.0
- port type: FloatPort
- value type: float (can be None)
max_value¶
Maximum value to include in the histogram. If None, the maximum value in the data will be used (non-streaming only).
- verbose name: Max Value
- default value: 1.0
- port type: FloatPort
- value type: float (can be None)
num_bins¶
Number of bins to use in the histogram.
- verbose name: Num Bins
- default value: 10
- port type: IntPort
- value type: int (can be None)
bin_edges¶
Bin edges for the histogram, described as a monotonically increasing list of edges. Bin edges, except for the last one, are exclusive of the next value. (i.e., Bin edges of [0,1,2,3] will create 3 bins: >=0<1, >=1<2, >=2<=3.) If specified, num_bins will be ignored.
- verbose name: Bin Edges
- default value: []
- port type: ListPort
- value type: list (can be None)
cumulative¶
Whether to compute the histogram cumulatively over all data packets received so far. This only applies to streaming data, since offline data contains a single packet. Typically you would want this to be true, since otherwise a new histogram will be generated for each packet. This only applies to counts.
- verbose name: Cumulative
- default value: True
- port type: BoolPort
- value type: bool (can be None)
ignore_nans¶
If true, elements containing nan values are ignored.
- verbose name: Ignore Items With Nan Values
- default value: False
- port type: BoolPort
- value type: bool (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)