Showing 137 of 184 total issues
Function _loss
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _loss(Q, X, Y, weights, metric='euclid'):
Function kernel_logeuclid
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def kernel_logeuclid(X, Y=None, *, reg=1e-10, **kwargs):
Function mean_alm
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def mean_alm(X=None, tol=1e-14, maxiter=100, sample_weight=None, covmats=None):
Function rjd
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def rjd(X, *, init=None, eps=1e-8, n_iter_max=100):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, n_components=2,
Function class_distinctiveness
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def class_distinctiveness(X, y, exponent=1, metric="riemann",
Function _get_best_freq_band
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _get_best_freq_band(all_class_dis, n_subband, subband_fmin, subband_fmax,
Function generate_random_spd_matrix
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def generate_random_spd_matrix(n_dim, random_state=None, *, mat_mean=.0,
Function mean_ale
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def mean_ale(X=None, tol=10e-7, maxiter=50, sample_weight=None, covmats=None):
Function make_outliers
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def make_outliers(n_matrices, mean, sigma, outlier_coeff=10,
Function plot_cospectra
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_cospectra(X, freqs, *, ylabels=None, title="Cospectra"):
Function kernel_euclid
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def kernel_euclid(X, Y=None, *, reg=1e-10, **kwargs):
Function kernel_riemann
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def kernel_riemann(X, Y=None, *, Cref=None, reg=1e-10):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, metric="riemann", threshold=3, n_iter_max=100,
Function _init_centroids
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _init_centroids(X, n_clusters, init, random_state, x_squared_norms):
Function mean_covariance
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def mean_covariance(X=None, metric="riemann", sample_weight=None, covmats=None,
Function uwedge
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def uwedge(X, *, init=None, eps=1e-7, n_iter_max=100):
Function _recursive
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _recursive(fun, A, B, *args, **kwargs):
Function eegtocov
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def eegtocov(sig, window=128, overlapp=0.5, padding=True, estimator="cov"):
Function median_riemann
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
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
- 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"