pyriemann_qiskit.classification.NearestConvexHull

class pyriemann_qiskit.classification.NearestConvexHull(n_jobs=6, n_hulls_per_class=3, n_samples_per_hull=10, subsampling='min', seed=None, optimizer=None)[source]

Classification by Nearest Convex Hull (NCH).

In Nearest Convex Hull (NCH) classifier [1], each class is modelized by the convex hull generated by the matrices corresponding to this class. There is no training. Calculating a distance to a hull is an optimization problem and it is calculated for each testing SPD matrix and each hull. The minimal distance defines the predicted class.

Current implementation is available only for log-Euclidean distance. It is compatible with constraint programming optimization [2].

Notes

Added in version 0.2.0.

Changed in version 0.4.2: Added optimizer parameter

Changed in version 0.6.0: Moved to algorithms sub-package

Parameters:
  • n_jobs (int, default=6) – Number of jobs to use for the computation. This works by computing each of the hulls in parallel.

  • n_hulls_per_class (int, default=3) – Number of hulls used per class, when subsampling is “random”.

  • n_samples_per_hull (int, default=15) – Number of matrices used to build a hull. -1 will include all matrices per class. If subsampling is “full”, this parameter is defaulted to -1.

  • subsampling ({"min", "random", "full"}, default="min") –

    Strategy to subsample the training set to estimate the hull, when computing the distance to hulls:

    • ”full” computes the hull on the entire training matrices, as in [1];

    • ”min” estimates hull using the n_samples_per_hull closest matrices;

    • ”random” estimates hull using n_samples_per_hull random matrices.

  • seed (float, default=None) – Optional random seed to use when subsampling is set to “random”.

  • optimizer (pyQiskitOptimizer, default=ClassicalOptimizer()) – An instance of pyriemann_qiskit.optimization.docplex.pyQiskitOptimizer.

References

[1] (1,2)

Convex Class Model on Symmetric Positive Definite Manifolds K. Zhao, A. Wiliem, S. Chen, and B. C. Lovell, Image and Vision Computing, 2019.

__init__(n_jobs=6, n_hulls_per_class=3, n_samples_per_hull=10, subsampling='min', seed=None, optimizer=None)[source]