MainModule
This is the main unit containing the PosDefManifoldML module.
dependencies
standard Julia packages | external packages |
---|---|
LinearAlgebra | PosDefManifold |
Statistics | GLMNet |
Random | Distributions |
Dates | LIBSVM |
StatsBase |
The main module does not contain functions.
types
MLmodel
As typical in machine learning packages, a type is created (a struct
in Julia) to specify a ML model. Supertype
abstract type MLmodel end
is the abstract type for all machine learning models. Supertype
abstract type PDmodel<:MLmodel end
is the abstract type for all machine learning models acting on the positive definite (PD) manifold (for example, see MDM
). Supertype
abstract type TSmodel<:MLmodel end
is the abstract type for all machine learning models acting on the tangent space (for example, see ENLR
).
IntVector
In all concerned functions class labels are given as a vector of integers, of type
IntVector=Vector{Int}
Class labels are natural numbers in $[1,...,z]$, where $z$ is the number of classes.
Tips & Tricks
working with metrics
In order to work with metrics for the manifold of positive definite matrices, make sure you install the PosDefManifold package.
the ℍVector type
Check this documentation on typecasting matrices.
notation & nomenclature
Throughout the code of this package the following notation is followed:
- scalars and vectors are denoted using lower-case letters, e.g.,
y
, - matrices using upper case letters, e.g.,
X
- sets (vectors) of matrices using bold upper-case letters, e.g.,
𝐗
.
The following nomenclature is used consistently:
𝐏Tr
: a training set of positive definite matrices𝐏Te
: a testing set of positive definite matrices𝐏
: a generic set of positive definite matrices.w
: a weights vector of non-negative real numbersyTr
: a training set class labels vector of positive integer numbers (1, 2,...)yTe
: a testing set class labels vector of positive integer numbersy
: a generic class labels vector of positive integer numbers.z
: number of classes of a ML modelk
: number of matrices in a set
In the examples, bold upper-case letters are replaced by upper case letters in order to allow reading in the REPL.
acronyms
- MDM: minimum distance to mean
- ENLR: Elastic-Net Logistic Regression
- SVM: Support-Vector Machine
- cv: cross-validation