Skip to content

← tensor_math package

RandomSubset

Select a random subset of instances in the given data.

Version 1.1.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: INOUT

subset_axis

Axis along which to subset the data.

  • verbose name: Subset Axis
  • default value: instance
  • port type: ComboPort
  • value type: str (can be None)

count

Number of items to retain (you may only set this property or fraction, not both).

  • verbose name: Count
  • default value: None
  • port type: IntPort
  • value type: int (can be None)

fraction

Fraction of items to retain (you may only set this property or count not both).

  • verbose name: Fraction
  • default value: None
  • port type: FloatPort
  • value type: float (can be None)

only_targets

Act only on instance elements that have the TargetMarkers field set. This can be accomplished via the AssignTargets node.

  • verbose name: Only Targets
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

random_seed

Seed for the random number generator. If not set, a random seed is chosen each time the node is run.

  • verbose name: Random Seed
  • default value: None
  • port type: IntPort
  • value type: int (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)