Showing 5 of 5 total issues
GMM
has 16 functions (exceeds 15 allowed). Consider refactoring. Open
Open
class GMM:
"""
A Gaussian Mixture Model that fits a given number of
components to maximize the log-likelihood of the model.
Function _validate_init
has a Cognitive Complexity of 18 (exceeds 10 allowed). Consider refactoring. Open
Open
def _validate_init(self):
"""
Validate the attributes of the CoreCluster.
"""
if self.cores.ndim != 1 or (self.cores.ndim == 0 and self.cores.size > 0):
- 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
Open
def __init__(self, init_cores=5, init='kmeans',
Function __init__
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(self, n_clusters=None, init_cores=10, stabilize=0.5, n_init=10,
Function __init__
has 7 arguments (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(self, init_cores=5, init='kmeans',n_init=10, max_iter=100,