Showing 40 of 131 total issues
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _make_stream
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _make_stream(self):
np.random.seed(self.random_state)
# Optionally binarize the data
if self.binarize:
- 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 feed
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def feed(self, X, real, pred):
if len(pred) != len(real):
self.drift.append(0)
self._is_drift = False
- 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_stream
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _make_stream(self):
np.random.seed(self.random_state)
# Optionally binarize the data
if self.binarize:
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function feed
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def feed(self, X, y, pred):
if not hasattr(self, "mu_W"):
self.W = np.copy(X)
self.Wy = np.copy(y)
- 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 feed
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def feed(self, X, y, pred):
if not hasattr(self, "mu_W"):
self.W = np.copy(X)
self.Wy = np.copy(y)
- 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 partial_fit
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def partial_fit(self, X, y, classes=None):
"""Partial fitting."""
X, y = check_X_y(X, y)
if not hasattr(self, "ensemble_"):
- 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, sigma=3, immobilizer=5, n_detectors=15, subspace_size=1, random_state=None, sensitivity=0.55):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function partial_fit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def partial_fit(self, X, y, classes=None):
super().partial_fit(X, y, classes)
if not self.green_light:
return self
- 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, base_estimator=None,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, base_estimator=None, beta=.5, theta=.01, p = 1, weighted=False):
Function partial_fit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def partial_fit(self, X, y, classes=None):
super().partial_fit(X, y, classes)
if not self.green_light:
return self
- 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 _sigmoid
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _sigmoid(self, sigmoid_spacing, n_drifts):
period = (
int((self.n_samples) / (n_drifts)) if n_drifts > 0 else int(self.n_samples)
)
css = sigmoid_spacing if sigmoid_spacing is not None else 9999
- 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 partial_fit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def partial_fit(self, X, y, classes=None):
"""Partial fitting"""
X, y = check_X_y(X, y)
if not hasattr(self, "ensemble_"):
self.ensemble_ = []
- 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
Avoid too many return
statements within this function. Open
return "%s_%s_css%i_rs%i_nd%i_ln%i_dd%s_%i" % (
Avoid too many return
statements within this function. Open
return "%s_%s_css%i_rs%i_nd%i_ln%i_%i_dd%s_%i" % (
Function partial_fit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def partial_fit(self, X, y, classes=None):
# Initialization
super().partial_fit(X, y, classes)
if not self.green_light:
return self
- 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 _set_weights
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _set_weights(self):
if self.age_ > 0:
if self.weight_calculation_method == "same_for_each":
self.weights_ = np.ones(len(self.ensemble_))
- 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"