alexandrebarachant/pyRiemann

View on GitHub

Showing 137 of 184 total issues

Function _loss has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def _loss(Q, X, Y, weights, metric='euclid'):
Severity: Minor
Found in pyriemann/transfer/_rotate.py - About 35 mins to fix

    Function kernel_logeuclid has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      Function mean_alm has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def mean_alm(X=None, tol=1e-14, maxiter=100, sample_weight=None, covmats=None):
      Severity: Minor
      Found in pyriemann/utils/mean.py - About 35 mins to fix

        Function rjd has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def rjd(X, *, init=None, eps=1e-8, n_iter_max=100):
        Severity: Minor
        Found in pyriemann/utils/ajd.py - About 35 mins to fix

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

              def __init__(self, n_components=2,
          Severity: Minor
          Found in pyriemann/embedding.py - About 35 mins to fix

            Function class_distinctiveness has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def class_distinctiveness(X, y, exponent=1, metric="riemann",
            Severity: Minor
            Found in pyriemann/classification.py - About 35 mins to fix

              Function _get_best_freq_band has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def _get_best_freq_band(all_class_dis, n_subband, subband_fmin, subband_fmax,
              Severity: Minor
              Found in examples/motor-imagery/helpers/frequencybandselection_helpers.py - About 35 mins to fix

                Function generate_random_spd_matrix has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def generate_random_spd_matrix(n_dim, random_state=None, *, mat_mean=.0,
                Severity: Minor
                Found in pyriemann/datasets/sampling.py - About 35 mins to fix

                  Function mean_ale has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def mean_ale(X=None, tol=10e-7, maxiter=50, sample_weight=None, covmats=None):
                  Severity: Minor
                  Found in pyriemann/utils/mean.py - About 35 mins to fix

                    Function make_outliers has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def make_outliers(n_matrices, mean, sigma, outlier_coeff=10,
                    Severity: Minor
                    Found in pyriemann/datasets/simulated.py - About 35 mins to fix

                      Function plot_cospectra has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def plot_cospectra(X, freqs, *, ylabels=None, title="Cospectra"):
                      Severity: Minor
                      Found in pyriemann/utils/viz.py - About 35 mins to fix

                        Function kernel_euclid has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

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

                          Function kernel_riemann has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

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

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

                                def __init__(self, metric="riemann", threshold=3, n_iter_max=100,
                            Severity: Minor
                            Found in pyriemann/clustering.py - About 35 mins to fix

                              Function _init_centroids has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def _init_centroids(X, n_clusters, init, random_state, x_squared_norms):
                              Severity: Minor
                              Found in pyriemann/clustering.py - About 35 mins to fix

                                Function mean_covariance has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def mean_covariance(X=None, metric="riemann", sample_weight=None, covmats=None,
                                Severity: Minor
                                Found in pyriemann/utils/mean.py - About 35 mins to fix

                                  Function uwedge has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def uwedge(X, *, init=None, eps=1e-7, n_iter_max=100):
                                  Severity: Minor
                                  Found in pyriemann/utils/ajd.py - About 35 mins to fix

                                    Function _recursive has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def _recursive(fun, A, B, *args, **kwargs):
                                    Severity: Minor
                                    Found in pyriemann/utils/distance.py - About 35 mins to fix

                                      Function eegtocov has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def eegtocov(sig, window=128, overlapp=0.5, padding=True, estimator="cov"):
                                      Severity: Minor
                                      Found in pyriemann/utils/covariance.py - About 35 mins to fix

                                        Function median_riemann has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        def median_riemann(X, *, tol=10e-6, maxiter=50, init=None, weights=None,
                                                           step_size=1):
                                            r"""Affine-invariant Riemannian geometric median of SPD/HPD matrices.
                                        
                                            The affine-invariant Riemannian geometric median minimizes the sum of
                                        Severity: Minor
                                        Found in pyriemann/utils/median.py - About 35 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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language