Showing 10 of 19 total issues
Function fit
has a Cognitive Complexity of 35 (exceeds 10 allowed). Consider refactoring. Open
def fit(self, X, Y, *args, weights=None, **kwargs):
"""
Train the model on the given data and labels.
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 16 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, n=50, d=5, r='sqrt', optimizer='adam', loss='cross-entropy',
Function __init__
has 14 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, d=5, r='sqrt', loss='cross-entropy',
Function __init__
has 13 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, layers=(100,), activation='relu', loss='cross-entropy',
Function fit
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def fit(self, X, Y, weights=None):
"""
Train the model on the given data and labels.
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 set_params
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def set_params(self, params):
"""
Set the attributes of the object with the given
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 9 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, loss='cross-entropy', max_iter=100, tol=1e-4,
Function __init__
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, ensemble, k=100, leaf_size=40,
Function get_activation
has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring. Open
def get_activation(name):
"""
Lookup table of default activation functions.
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 organize
has a Cognitive Complexity of 11 (exceeds 10 allowed). Consider refactoring. Open
def organize(self, prepend=[], append=[]):
"""
Organize the BatchDataset according to `order`.
In this manner, the order of shuffle, repeat, and
batch affect how the data is drawn.
- 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"