alexandrebarachant/pyRiemann

View on GitHub

Showing 137 of 184 total issues

Function _get_rotation_matrix has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

def _get_rotation_matrix(M_source, M_target, weights=None, metric='euclid',
Severity: Major
Found in pyriemann/transfer/_rotate.py - About 50 mins to fix

    Function locally_linear_embedding has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def locally_linear_embedding(X,
    Severity: Major
    Found in pyriemann/embedding.py - About 50 mins to fix

      Function _slice_sampling has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def _slice_sampling(ptarget, n_samples, x0, n_burnin=20, thin=10,
      Severity: Major
      Found in pyriemann/datasets/sampling.py - About 50 mins to fix

        Function plot_embedding has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def plot_embedding(X,
        Severity: Major
        Found in pyriemann/utils/viz.py - About 50 mins to fix

          Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self, window=128, overlap=0.5, fmin=None, fmax=None, fs=None,
          Severity: Major
          Found in pyriemann/spatialfilters.py - About 50 mins to fix

            Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(self,
            Severity: Major
            Found in pyriemann/estimation.py - About 50 mins to fix

              Function cve_role has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def cve_role(name, rawtext, text, lineno, inliner, options=None, content=None):
              Severity: Major
              Found in doc/sphinxext/sphinx_issues.py - About 50 mins to fix

                Function maskedmean_riemann has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def maskedmean_riemann(X=None, masks=None, tol=10e-9, maxiter=100, init=None,
                Severity: Major
                Found in pyriemann/utils/mean.py - About 50 mins to fix

                  Function unique_permutations has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def unique_permutations(elements):
                      """Return the list of unique permutations."""
                      if len(elements) == 1:
                          yield (elements[0], )
                      else:
                  Severity: Minor
                  Found in pyriemann/stats.py - About 45 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function _sample_gaussian_spd_centered has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def _sample_gaussian_spd_centered(n_matrices, n_dim, sigma, random_state=None,
                  Severity: Minor
                  Found in pyriemann/datasets/sampling.py - About 45 mins to fix

                    Function _get_within has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def _get_within(X, y, means, classes, exponent, metric):
                    Severity: Minor
                    Found in pyriemann/classification.py - About 45 mins to fix

                      Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(self,
                      Severity: Minor
                      Found in pyriemann/stats.py - About 45 mins to fix

                        Function sample_gaussian_spd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def sample_gaussian_spd(n_matrices, mean, sigma, random_state=None,
                        Severity: Minor
                        Found in pyriemann/datasets/sampling.py - About 45 mins to fix

                          Function mean_wasserstein has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def mean_wasserstein(X=None, tol=10e-4, maxiter=50, init=None,
                          Severity: Minor
                          Found in pyriemann/utils/mean.py - About 45 mins to fix

                            Function kernel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def kernel(X, Y=None, *, Cref=None, metric="riemann", reg=1e-10):
                            Severity: Minor
                            Found in pyriemann/utils/kernel.py - About 45 mins to fix

                              Function _check_labels has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def _check_labels(self, X, y):
                                      """Check validity of labels."""
                                      if y is not None:
                                          if len(y) != len(X):
                                              raise ValueError("y must be the same length of X")
                              Severity: Minor
                              Found in pyriemann/clustering.py - About 45 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function mean_riemann has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def mean_riemann(X=None, tol=10e-9, maxiter=50, init=None, sample_weight=None,
                              Severity: Minor
                              Found in pyriemann/utils/mean.py - About 45 mins to fix

                                Function ajd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def ajd(X, method="ajd_pham", init=None, eps=1e-6, n_iter_max=100, **kwargs):
                                Severity: Minor
                                Found in pyriemann/utils/ajd.py - About 45 mins to fix

                                  Function _apply_matrix_kernel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def _apply_matrix_kernel(kernel_fct, X, Y=None, *, Cref=None, reg=1e-10):
                                  Severity: Minor
                                  Found in pyriemann/utils/kernel.py - About 45 mins to fix

                                    Function cospectrum has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def cospectrum(X, window=128, overlap=0.75, fmin=None, fmax=None, fs=None):
                                    Severity: Minor
                                    Found in pyriemann/utils/covariance.py - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language