File rgraph.py
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Wontfix
# -*- coding: utf-8 -*-
""" R-graph
"""
# Author: Michiel Bongaerts (but not author of the R-graph method)
Function elastic_net_subspace_clustering
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Wontfix
def elastic_net_subspace_clustering(self, X, gamma=50.0, gamma_nz=True,
tau=1.0, algorithm='lasso_lars',
fit_intercept_LR=False,
active_support=True,
active_support_params=None,
- 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 decision_function
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def decision_function(self, X):
"""Predict raw anomaly score of X using the fitted detector.
The anomaly score of an input sample is computed based on different
detector algorithms. For consistency, outliers are assigned with
- 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 4 allowed). Consider refactoring. Wontfix
def __init__(self, transition_steps=10, n_nonzero=10, gamma=50.0,
Function active_support_elastic_net
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def active_support_elastic_net(self, X, y, alpha, tau=1.0,
algorithm='lasso_lars', support_init='L2',
support_size=100, maxiter=40,
maxiter_lasso=1000):
"""
- 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 elastic_net_subspace_clustering
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def elastic_net_subspace_clustering(self, X, gamma=50.0, gamma_nz=True,
Function active_support_elastic_net
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def active_support_elastic_net(self, X, y, alpha, tau=1.0,