Largest¶
Find the largest value along a given axis.
The chosen axis will be removed from the data and replaced by a new one-element feature axis. This node can return either the value (default) or the index of the largest elements, and it can optionally ignore nan values. Version 1.1.0
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: AnyNumeric (can be None)
- data direction: INOUT
axis¶
Axis along which to take the statistic. This axis will drop out of the data and, if keep_axis is set, is replaced by a dummy one-element axis (usually of same type as before, although special cases apply for specific reduction nodes). One may also list a comma-separated list of axes here to reduce over multiple axes at a time. If this is left blank or set to None, then all axes will be reduced over; this can be used to obtain a single value if keep_axis is also set to False. The tree axis is a special case that will reduce over the data structure itself (e.g., dictionary), and the streams axis will reduce over the streams in a packet.
- verbose name: Act Along Axis
- default value: instance
- port type: ComboPort
- value type: str (can be None)
axis_occurrence¶
Index of the occurrence of the axis of desired type. (0 is the first axis of the desired type, 1 is the second, -1 is the last, -2 is the second-to-last, and so on).
- verbose name: Axis Occurrence
- default value: 0
- port type: IntPort
- value type: int (can be None)
keep_axis¶
Keep the axis that was reduced as a singleton (one-element) axis in the data. In script usage this can also be set to None to reduce over and drop all axes and return a scalar value (in graph pipelines the same can be achieved by setting the axis to (all axes) and keep_axis to False).
- verbose name: Keep Reduced Axis
- default value: True
- port type: BoolPort
- value type: bool (can be None)
kept_axis¶
New type of the axis that was reduced over, if the keep_axis (keep reduced axis) option is enabled. Setting this to the type of an axis (e.g., feature) will result in a one-element axis of that type in place of the original axis; the value 'same' will yield an axis of the same type as the original axis (and will also preserve the old axis' custom label, if any). The 'legacy' setting will preserve the type of some axes but generate a feature axes for others, and this is not consistent between e.g., Mean, Variance and other statistics (see the "force feature axis" option for full details). The default value will change from 'legacy' to 'same' in a future release. The 'legacy (warn)' setting is like 'legacy' but will additionally issue an actionable one-time warning in which way the node's behavior will transition to a more consitent mode, and how to preserve the current behavior. One may also specify other axis types here. Note that, while one may bake a desired axis label into the axis type here, it is considered bad practice to use the label to annotate the statistic used, especially if the axis should pair correctly with other axes of same type (but perhaps different label) in downstream operations. Use a feature, statistic, or named axis for this purpose, which will record the statistic in the (one-element) axis array instead.
- verbose name: Axis If Kept
- default value: legacy
- port type: ComboPort
- value type: str (can be None)
force_feature_axis¶
Deprecated option used in legacy pipelines. This field should be cleared in modern uses, in which case the kept_axis field takes precedence. Setting this to 'True' will always create a feature axis; setting it to 'False' will preserve the same axis type IF the legacy behavior of the node supported it, and otherwise creates a feature axis. Cases in which a feature axis was created if set to False are as follows: Variance, StandardDeviation, and CurveLength: space, frequency, instance, named, statistic, and axis were reduced to feature. Sum, MedianAbsoluteDeviation, Product, RootMeanSquare: space, named, statistic, and axis were reduced to feature. Mean: lag, named, statistic, and axis were reduced to feature. All, Any, Centroid, Largest, Smallest, Median: lag was reduced to feature.
- verbose name: Force Feature Axis (Legacy)
- default value: None
- port type: Port
- value type: object (can be None)
output¶
Output the values or the indices of the largest elements.
- verbose name: Output Type
- default value: values
- port type: EnumPort
- value type: str (can be None)
ignore_nans¶
If set, any nan values in the data are ignored.
- verbose name: Ignore 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)
recurse_lists¶
Whether to treat lists as a recursive data structure as opposed to a numeric array. When disabled, lists are treated like arrays; they are expected to contain numbers or regularly shaped sublists of numbers and are subject to the conventional broadcasting rules of arrays known from numpy and similar libraries. When this option is enabled, lists may instead contain non-numeric data structures such as packets, dictionaries, tuples, or lists of non-uniform shapes, and will in turn not be subject to normal array broadcasting rules. Processing lists of numbers this way involves more overhead than when this option is set to False. Note that dictionaries and tuples are always treated as recursive data structures by this node.
- verbose name: Lists As Data Structure
- default value: False
- port type: BoolPort
- value type: bool (can be None)