Skip to content

← feature_extraction package

CovarianceTangentSpace

Project covariance matrices into a tangent space around their mean.

This is a feature-extraction method that transforms covariance matrices from their native Riemannian space (the manifold of symmetric positive-definite or SPD matrices) to an linearized and orthonormal Euclidean space. The linearization happens around the mean of the given covariance matrices. Note that the resulting feature space has N*(N+1)/2 dimensions, since the redundancy due to symmetry is eliminated, and the matrices are turned into feature vectors. Linear operations in the resulting space (e.g., linear classifiers or dimensionality reduction) correspond to Riemannian operations in the original manifold, although the approximation loses accuracy outside the vicinity of the linearization point (the covariance mean). The mean estimate can optionally be robust (using the geometric median). Also, the node can optionally adapt the mean to new data (where the weight of the old data is governed by the prior_data_weight parameter), as well as online (incrementally). In the incremental case, the estimation will be less robust than offline, but more so than the non-robust variant. Version 0.2.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

robust

Use robust estimator for mean estimation. This uses a geometric-median estimator and works offline and online.

verbose name
Robust
default value
False
port type
BoolPort
value type
bool (can be None)

adapt_newdata

Adapt to new data. If new data is received, the mean used for the tangent-space projection will be adapted. This works offline and online.

verbose name
Adapt To New Data
default value
False
port type
BoolPort
value type
bool (can be None)

simulate_incremental

Simulate incremental estimation, even if the given data is available in whole. This only applies to offline analysis, and can be applied either to the test data only, to both data, or not applied.

verbose name
Simulate Incremental
default value
no
port type
EnumPort
value type
str (can be None)

prior_data_weight

Weight of prior offline (training) data when adapting on new data. This is given as the equivalent number of trials (i.e., if this is 10, the old data counts as much as 10 new trials, and so after 20 new trials the old data will be weighted 1/3). If this is set to None, the actual number of trials will be used as the weight.

verbose name
Prior Data Weight
default value
15
port type
IntPort
value type
int (can be None)

max_iter

Max number of iterations for non-incremental mean estimate. This value serves as an additional stopping criterion for the learning algorithm, and can be used to ensure that the method runs in a fixed time budget. This rarely has to be tuned.

verbose name
Max Number Of Iterations
default value
50
port type
IntPort
value type
int (can be None)

tolerance

Convergence tolerance for non-incremental mean estimate. A lower tolerance will lead to longer running times and can result in more accurate solutions -- however, note that the actual difference in the outputs will be minimal at best, unless a very coarse tolerance is used.

verbose name
Convergence Tolerance
default value
1e-05
port type
FloatPort
value type
float (can be None)

step_size

Step size for recursive update. This is relative to the data dispersion, unless simulate_incremental is set to 'train-and-test', in which case it is absolute.

verbose name
Step Size
default value
0.5
port type
FloatPort
value type
float (can be None)

learning_rate_alpha

Exponential decay factor for recursive update. This is the alpha parameter of the Robbins-Munro learning-rate schedule.

verbose name
Learning Rate Alpha
default value
0.75
port type
FloatPort
value type
float (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)