Skip to content

← machine_learning package

CovarianceMDM

Classify covariance matrices based on a Riemannian minimum-distance-to-mean criterion.

This method assumes that the input features are not feature vectors but instead covariance matrices (i.e., as computed using one of the covariance estimation nodes). This node will find the average (centroid) of of trials in each class, and then classify new trials (each a covariance matrix) based on what class mean they are closest to. This distance metric is non-Euclidean and instead follows the Riemannian geometry of covariance matrices. One can optionally use robust estimation if the data is believed to be contaminated with outliers. The node can also be used to emit the raw distances. Version 0.5.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

output

output format to use. If using probabilities, this will attempt to estimate the probability that some given data belongs to each of the classes; these probabilities are very conservative. If using distances, this will output the raw distances to each class mean. If using class-labels, the most likely class labels of the trials will be returned.

verbose name
Output
default value
probabilities
port type
EnumPort
value type
str (can be None)

robust

Use robust estimator for class means.

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

max_iter

Max number of iterations for 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 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)

falloff_distribution

Probability distribution to model falloff, for outputting probabilities. Norm is the normal (Gaussian) distribution, cauchy is the Cauchy distribution, and gennorm is the generalized normal distribution (Version 1). The choice of distribution will not affect the ranking of emitted class probabilities, but their confidence.

verbose name
Falloff Distribution
default value
gennorm
port type
EnumPort
value type
str (can be None)

initialize_once

Calibrate the model only once. If set to False, then this node will recalibrate itself whenever a non-streaming data chunk is received that has both training labels and associated training instances.

verbose name
Calibrate Only Once
default value
True
port type
BoolPort
value type
bool (can be None)

dont_reset_model

Do not reset the model when the preceding graph is changed. Normally, when certain parameters of preceding nodes are being changed, the model will be reset. If this is enabled, the model will persist, but there is a chance that the model is incompatible when input data format to this node has changed.

verbose name
Do Not Reset Model
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)