Showing 138 of 185 total issues
Function covariance_mest
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def covariance_mest(X, m_estimator, *, init=None, tol=10e-3, n_iter_max=50,
Function _fit_single
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fit_single(X, y=None, n_clusters=2, init='random', random_state=None,
Function plot_potato_2D
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_potato_2D(ax, cax, X, Y, p_zscores, p_center, covs, p_colors, clabel):
Function get_results
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_results(X, y, all_ppl):
results = []
le = LabelEncoder()
y_ = le.fit_transform(y)
cv = StratifiedKFold(5, shuffle=True, random_state=42)
- 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 make_classification_transfer
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_classification_transfer(n_matrices, class_sep=3.0, class_disp=1.0,
Function make_matrices
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_matrices(n_matrices, n_dim, kind, rs=None, return_params=False,
Function _run_minimization
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _run_minimization(Q_ini, M_source, M_target, weights=None, metric='euclid',
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, n_clusters=2, max_iter=100, metric="riemann",
Function _get_filtered_cov
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_filtered_cov(raw, picks, event_id, fmin, fmax, tmin, tmax, verbose):
Function _run_minimization
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _run_minimization(Q_ini, M_source, M_target, weights=None, metric='euclid',
tol_step=1e-9, maxiter=10_000, maxiter_linesearch=32):
Q_1 = Q_ini
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def fit(self, X, y=None):
"""Fit (estimates) the clusters.
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 mean_riemann
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def mean_riemann(X=None, tol=10e-9, maxiter=50, init=None, sample_weight=None,
covmats=None):
r"""Mean of SPD/HPD matrices according to the Riemannian metric.
The affine-invariant Riemannian mean minimizes the sum of squared
- 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 make_node
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def make_node(self, name, issue_no, config, options=None):
name_map = {"pr": "pull", "issue": "issues", "commit": "commit"}
options = options or {}
repo_match = self.EXTERNAL_REPO_REGEX.match(issue_no)
if repo_match: # External repo
- 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 __call__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function _slice_sampling
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _slice_sampling(ptarget, n_samples, x0, n_burnin=20, thin=10,
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,
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,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, n_potatoes=1, p_threshold=0.01, z_threshold=3,
Function median_riemann
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def median_riemann(X, *, tol=10e-6, maxiter=50, init=None, weights=None,
Function cve_role
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def cve_role(name, rawtext, text, lineno, inliner, options=None, content=None):