class_docstr: Regression by support-vector machine.
  
  Support-vector machine (SVM) regression with precomputed Riemannian kernel
  matrix according to different metrics, extending the idea described in [1]_
  to regression.
  
  Parameters
  ----------
  metric : {'riemann', 'euclid', 'logeuclid'}, default='riemann'
      Metric for kernel matrix computation.
  Cref : None | ndarray, shape (n_channels, n_channels)
      Reference point for kernel matrix computation. If None, the mean of
      the training data according to the metric is used.
  kernel_fct : 'precomputed' | callable
      If 'precomputed', the kernel matrix for datasets X and Y is estimated
      according to `pyriemann.utils.kernel(X, Y, Cref, metric)`.
      If callable, the callable is passed as the kernel parameter to
      `sklearn.svm.SVC()` [2]_. The callable has to be of the form
      `kernel(X, Y, Cref, metric)`.
  tol : float, default=1e-3
      Tolerance for stopping criterion.
  C : float, default=1.0
      Regularization parameter. The strength of the regularization is
      inversely proportional to C. Must be strictly positive.
      The penalty is a squared l2 penalty.
  epsilon : float, default=0.1
       Epsilon in the epsilon-SVR model. It specifies the epsilon-tube
       within which no penalty is associated in the training loss function
       with points predicted within a distance epsilon from the actual
       value.
  shrinking : bool, default=True
      Whether to use the shrinking heuristic.
  cache_size : float, default=200
      Specify the size of the kernel cache (in MB).
  verbose : bool, default=False
      Enable verbose output. Note that this setting takes advantage of a
      per-process runtime setting in libsvm that, if enabled, may not work
      properly in a multithreaded context.
  max_iter : int, default=-1
      Hard limit on iterations within solver, or -1 for no limit.
  
  Attributes
  ----------
  data_ : ndarray, shape (n_matrices, n_channels, n_channels)
      If fitted, training data.
  
  Notes
  -----
  .. versionadded:: 0.3
  
  References
  ----------
  .. [1] `Classification of covariance matrices using a Riemannian-based
      kernel for BCI applications
      <https://hal.archives-ouvertes.fr/hal-00820475/>`_
      A. Barachant, S. Bonnet, M. Congedo and C. Jutten. Neurocomputing,
      Elsevier, 2013, 112, pp.172-178.
  .. [2]
      https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html
class_docstr_tok: ["Regression","by","support-vector","machine",".","Support-vector","machine","(","SVM",")","regression","with","precomputed","Riemannian","kernel","matrix","according","to","different","metrics",",","extending","the","idea","described","in","[","1","]","_","to","regression",".","Parameters","--","--","--","--","--","metric",":","{","'riemann","'",",","'euclid","'",",","'logeuclid","'","}",",","default='riemann'","Metric","for","kernel","matrix","computation",".","Cref",":","None","|","ndarray",",","shape","(","n_channels",",","n_channels",")","Reference","point","for","kernel","matrix","computation",".","If","None",",","the","mean","of","the","training","data","according","to","the","metric","is","used",".","kernel_fct",":","'precomputed","'","|","callable","If","'precomputed","'",",","the","kernel","matrix","for","datasets","X","and","Y","is","estimated","according","to","`","pyriemann.utils.kernel","(","X",",","Y",",","Cref",",","metric",")","`",".","If","callable",",","the","callable","is","passed","as","the","kernel","parameter","to","`","sklearn.svm.SVC","(",")","`","[","2","]","_",".","The","callable","has","to","be","of","the","form","`","kernel","(","X",",","Y",",","Cref",",","metric",")","`",".","tol",":","float",",","default=1e-3","Tolerance","for","stopping","criterion",".","C",":","float",",","default=1.0","Regularization","parameter",".","The","strength","of","the","regularization","is","inversely","proportional","to","C.","Must","be","strictly","positive",".","The","penalty","is","a","squared","l2","penalty",".","epsilon",":","float",",","default=0.1","Epsilon","in","the","epsilon-SVR","model",".","It","specifies","the","epsilon-tube","within","which","no","penalty","is","associated","in","the","training","loss","function","with","points","predicted","within","a","distance","epsilon","from","the","actual","value",".","shrinking",":","bool",",","default=True","Whether","to","use","the","shrinking","heuristic",".","cache_size",":","float",",","default=200","Specify","the","size","of","the","kernel","cache","(","in","MB",")",".","verbose",":","bool",",","default=False","Enable","verbose","output",".","Note","that","this","setting","takes","advantage","of","a","per-process","runtime","setting","in","libsvm","that",",","if","enabled",",","may","not","work","properly","in","a","multithreaded","context",".","max_iter",":","int",",","default=-1","Hard","limit","on","iterations","within","solver",",","or","-1","for","no","limit",".","Attributes","--","--","--","--","--","data_",":","ndarray",",","shape","(","n_matrices",",","n_channels",",","n_channels",")","If","fitted",",","training","data",".","Notes","--","--","-","..","versionadded",":",":","0.3","References","--","--","--","--","--","..","[","1","]","`","Classification","of","covariance","matrices","using","a","Riemannian-based","kernel","for","BCI","applications","<","https",":","\/\/hal.archives-ouvertes.fr\/hal-00820475\/",">","`","_","A.","Barachant",",","S.","Bonnet",",","M.","Congedo","and","C.","Jutten",".","Neurocomputing",",","Elsevier",",","2013",",","112",",","pp.172-178",".","..","[","2","]","https",":","\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.svm.SVR.html"]
docstr: Init.
docstr_tok: ["Init","."]
code: def __init__(
      self,
      *,
      metric="riemann",
      kernel_fct=None,
      Cref=None,
      tol=1e-3,
      C=1.0,
      epsilon=0.1,
      shrinking=True,
      cache_size=200,
      verbose=False,
      max_iter=-1,
  ):
      """Init."""
      self.Cref = Cref
      self.metric = metric
      self.Cref_ = None
      self.kernel_fct = kernel_fct
      super().__init__(
          kernel="precomputed",
          tol=tol,
          C=C,
          epsilon=epsilon,
          shrinking=shrinking,
          cache_size=cache_size,
          verbose=verbose,
          max_iter=max_iter,
      )
  
file_path: pyRiemann/pyriemann/regression.py
imports: import functools
  import numpy
  from sklearn.metrics import r2_score
  from sklearn.svm import SVR
  from sklearn.utils.extmath import softmax
  from .utils.kernel import kernel
  from .classification import MDM, _check_metric
  from .utils.mean import mean_covariance
label_desc: Use image node_id 1 to create a new SVR object from inherited base classes: sklearnSVR with example: obj = SVR()