class_docstr: Artefact detection with the Riemannian Potato Field.
  
  The Riemannian Potato Field [1]_ is a clustering method used to detect
  artifact in EEG signals. The algorithm combines several potatoes of low
  dimension, each one being designed to capture specific artifact typically
  affecting specific subsets of channels and/or specific frequency bands.
  
  Parameters
  ----------
  n_potatoes : int, default=1
      Number of potatoes in the field.
  p_threshold : float, default=0.01
      Threshold on probability to being clean, in (0, 1), combining
      probabilities of potatoes using Fisher's method.
  z_threshold : float, default=3
      Threshold on z-score of distance to reject artifacts. It is the number
      of standard deviations from the mean of distances to the centroid.
  metric : string, default='riemann'
      The type of metric used for centroid and distance estimation.
  n_iter_max : int, default=10
      The maximum number of iteration to reach convergence.
  pos_label: int, default=1
      The positive label corresponding to clean data.
  neg_label: int, default=0
      The negative label corresponding to artifact data.
  
  Notes
  -----
  .. versionadded:: 0.3
  
  See Also
  --------
  Potato
  
  References
  ----------
  .. [1] `The Riemannian Potato Field: A Tool for Online Signal Quality Index
      of EEG
      <https://hal.archives-ouvertes.fr/hal-02015909>`_
      Q. Barthélemy, L. Mayaud, D. Ojeda, and M. Congedo. IEEE Transactions
      on Neural Systems and Rehabilitation Engineering, IEEE Institute of
      Electrical and Electronics Engineers, 2019, 27 (2), pp.244-255
docstr: Check validity of input length.
docstr_tok: ["Check","validity","of","input","length","."]
code: def _check_length(self, X):
      """Check validity of input length."""
      if len(X) != self.n_potatoes:
          raise ValueError(
              "Length of X is not equal to n_potatoes. Should be %d but got "
              "%d." % (self.n_potatoes, len(X))
          )
  
imports: import numpy
  from joblib import Parallel, delayed
  from scipy.stats import norm, chi2
  import sklearn
  from sklearn.base import BaseEstimator, ClassifierMixin, TransformerMixin, ClusterMixin, clone
  from sklearn.cluster import KMeans
  from .classification import MDM, _check_metric
  from .utils.mean import mean_covariance
  from .utils.geodesic import geodesic
label_desc: Use image node_id 7 for calling the PotatoField obj's underlying member method code with example usage: obj._check_length(X) without return types