Showing 137 of 184 total issues
Function nanmean_riemann
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def nanmean_riemann(X=None, tol=10e-9, maxiter=100, init=None,
Function ajd_pham
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ajd_pham(X, *, init=None, eps=1e-6, n_iter_max=20, sample_weight=None):
Function _update_doc
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _update_doc(self, olddoc):
newdoc = ".. warning:: DEPRECATED"
if self.extra:
newdoc = "%s: %s" % (newdoc, self.extra)
if olddoc:
- Read upRead up
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 fit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fit(self, X, y):
"""Fit.
Estimate the prototyped responses for each class.
- Read upRead up
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 plot_classifiers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def plot_classifiers(metric):
figure = plt.figure(figsize=(12, 10))
figure.suptitle(f"Compare classifiers with metric='{metric}'", fontsize=16)
i = 1
- Read upRead up
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_logdet
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def mean_logdet(X=None, tol=10e-5, maxiter=50, init=None, sample_weight=None,
Function plot_cospectra
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def plot_cospectra(X, freqs, *, ylabels=None, title="Cospectra"):
"""Plot cospectral matrices.
Parameters
----------
- Read upRead up
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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function online_detect
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def online_detect(t):
global time, sig, covs_visu
# Online artifact detection
rp_label = rpotato.predict(covs[np.newaxis, t])[0]
- Read upRead up
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 median_euclid
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def median_euclid(X, *, tol=10e-6, maxiter=50, init=None, weights=None):
Function _sample_parameter_r
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _sample_parameter_r(n_samples, n_dim, sigma,
Function cross_spectrum
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def cross_spectrum(X, window=128, overlap=0.75, fmin=None, fmax=None, fs=None):
Function uwedge
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def uwedge(X, *, init=None, eps=1e-7, n_iter_max=100):
"""Approximate joint diagonalization based on UWEDGE.
This is an implementation of the AJD algorithm [1]_ [2]_: uniformly
weighted exhaustive diagonalization using Gauss iterations (U-WEDGE).
- Read upRead up
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 barycenter_weights
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def barycenter_weights(X, Y, indices, metric="riemann", kernel=None, reg=1e-3):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, window=128, overlap=0.75, fmin=None, fmax=None,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, power_list=[-1, 0, 1], method_label="sum_means",
Function filter_bandpass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def filter_bandpass(signal, low_freq, high_freq, channels=None, method="iir"):
Function _grad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _grad(Q, X, Y, weights, metric='euclid'):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, window=128, overlap=0.75, fmin=None, fmax=None,
Function bandpass_filter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def bandpass_filter(raw, l_freq, h_freq, method="iir", verbose=False):