Showing 137 of 184 total issues
Function _rejection_sampling_2D
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _rejection_sampling_2D(n_samples, sigma, random_state=None,
return_acceptance_rate=False):
"""Rejection sampling algorithm for the 2D case.
Implementation of a rejection sampling algorithm. The implementation
- 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_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 _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 _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 __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, n_clusters=2, max_iter=100, metric="riemann",
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 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 mean_alm
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def mean_alm(X=None, tol=1e-14, maxiter=100, sample_weight=None, covmats=None):
r"""Ando-Li-Mathias (ALM) mean of SPD/HPD matrices.
Return the geometric mean recursively [1]_, generalizing from:
- 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 _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 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 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 user_role
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def user_role(name, rawtext, text, lineno, inliner, options=None, content=None):
Function __call__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function coherence
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def coherence(X, window=128, overlap=0.75, fmin=None, fmax=None, fs=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 mean_power
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def mean_power(X=None, p=None, *, sample_weight=None, zeta=10e-10, maxiter=100,