Skip to content

← statistics package

CovarianceTaper

Compute a spatial taper matrix for covariance regularization.

This matrix can be multiplied elementwise with a given covariance (or correlation) matrix in order to better regularize spatial statistics of the data. This is typically only reelvant for data with very high channel counts (100s to 1000s), and/or covariance matrices calculated from very few samples. More Info... Version 0.8.0

Ports/Properties

data

Data to generate taper from.

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

no_cross_hemispheric

Disallow correlation between channels on opposite hemispheres (left/right)

  • verbose name: No Cross Hemispheric
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

no_wavelength_corr

Disallow inter-wavelength correlation. More generally, this disallows correlation between channels that differ in the .units value in the data's space axis.

  • verbose name: No Wavelength Corr
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

length_falloff

For channels that have a source-detector length, the [min, max] length limits. Channels shorter than min will have a weight of 1, and channels longer than max will have a weight of 0.

  • verbose name: Length Falloff
  • default value: None
  • port type: ListPort
  • value type: list (can be None)

max_distance

The maximum distance between channels beyond which correlation shall be zero. The falloff from zero to this radius is governed by the distance_falloff_curve parameter.

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

distance_falloff_curve

Type of curve for radial falloff to channel center (weight 1) to max_distance (weight 0). The curves follow the approximate shape of a linear, quadratic or cubic slope, but are modified to ensure positive definiteness of the taper kernel. The Gaussian does not fall off to zero at the given radius, while the others do.

  • verbose name: Distance Falloff Curve
  • default value: linear
  • port type: EnumPort
  • value type: str (can be None)

length_falloff_curve

Type of curve for falloff with increasing channel length (between min and max length).

  • verbose name: Length Falloff Curve
  • default value: linear
  • port type: EnumPort
  • value type: str (can be None)

distance_mode

Points on a channel between which the distance to another channel shall be measured. Mid is the typical choice and is the channel's position, or the midpoint between a channel's source and detector (e.g. for NIRS) positions. Optical-mid is the same midpoint but corrected towards the center of the montage based on the distance (this is more appropriate for multi-distance NIRS measurements). Src and dst are the channel's source and detector positions, respectively. Min is the approx. distance between the closest points on the two source-detector lines for the two channels, and Mean is the average between all pairs of points along the two lines. Mean-min is the average distance to the closest point on the respective other line. Note that the latter three do not lead to valid (positive-definite) taper matrices, and the resulting matrix will be patched to satisfy this requirement (this may result in a tradeoff in fidelity).

  • verbose name: Distance Mode
  • default value: mid
  • port type: EnumPort
  • value type: str (can be None)

sanity_check

Check symmetry and positive definiteness of resulting matrix.

  • verbose name: Sanity Check
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

line_points

Number of points along the line between a channel's source and detector to consider. This is used for distance calculations.

  • verbose name: Line Points
  • default value: 20
  • port type: IntPort
  • value type: int (can be None)

line_interval

Line interval to consider for line-based distance calculations. These are the [start,end] fractions along the line that limit the segment that shall be used for distances; e.g., [1/3, 2/3] will only use the middle third of a channel's line. This is because eg in NIRS, the superficial end segments of a channel measure may be of lesser interest.

  • verbose name: Line Interval
  • default value: [0.25, 0.75]
  • port type: ListPort
  • value type: list (can be None)

length_unit

The unit in which the spatial limits (length, distance) are provided.

  • verbose name: Length Unit
  • default value: mm
  • port type: EnumPort
  • value type: str (can be None)

depth_scale

Scaling of channel midpoint depth as a function of length. This determines how deep we estimate a NIRS channel to pass into the brain based on its length (e.g., 0.5 means that a 5cm channel is assumed to go 2.5cm deep).

  • verbose name: Depth Scale
  • default value: 0.5
  • port type: FloatPort
  • value type: float (can be None)

eps

Small value to bias diagonal entries of matrix to ensure positive definiteness despite numerical errors.

  • verbose name: Eps
  • default value: 1e-10
  • port type: FloatPort
  • value type: float (can be None)

verbose

Produce verbose output.

  • verbose name: Verbose
  • 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)