yzhao062/combo

View on GitHub

Showing 9 of 56 total issues

Function _predict_internal has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    def _predict_internal(self, X, predict_proba):
        """Internal function for predict and predict_proba

        Parameters
        ----------
Severity: Minor
Found in combo/models/classifier_des.py - About 3 hrs to fix

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_estimators, local_region_size=30,
Severity: Minor
Found in combo/models/classifier_des.py - About 45 mins to fix

    Function _create_scores has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def _create_scores(self, X):
            """Internal function to generate and combine scores.
    
            Parameters
            ----------
    Severity: Minor
    Found in combo/models/detector_comb.py - About 45 mins to fix

    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 _predict_internal has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def _predict_internal(self, X, predict_proba):
            """Internal function for predict and predict_proba
    
            Parameters
            ----------
    Severity: Minor
    Found in combo/models/classifier_dcs.py - About 45 mins to fix

    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 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, base_estimators, n_clusters, linkage_method='single',
    Severity: Minor
    Found in combo/models/cluster_eac.py - About 35 mins to fix

      Function visualize_clusters has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def visualize_clusters(model_name, X, predicted_labels, show_figure=True,
      Severity: Minor
      Found in combo/utils/example.py - About 35 mins to fix

        Function __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            def __init__(self, base_estimators, local_region_size=30,
                         n_selected_clfs=None, use_weights=False, threshold=None,
                         pre_fitted=None):
        
                super(DES_LA, self).__init__(
        Severity: Minor
        Found in combo/models/classifier_des.py - About 35 mins to fix

        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 _process_data has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            def _process_data(self, X):
                """Internal class for both `predict` and `predict_proba`
        
                Parameters
                ----------
        Severity: Minor
        Found in combo/models/classifier_stacking.py - About 25 mins to fix

        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 6 (exceeds 5 allowed). Consider refactoring.
        Open

            def fit(self, X):
                """Fit estimators.
        
                Parameters
                ----------
        Severity: Minor
        Found in combo/models/cluster_eac.py - About 25 mins to fix

        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

        Severity
        Category
        Status
        Source
        Language