HazureChi/kenchi

View on GitHub

Showing 37 of 37 total issues

Function make_blobs has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

def make_blobs(
Severity: Major
Found in kenchi/datasets/samples_generator.py - About 1 hr to fix

    Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(
    Severity: Major
    Found in kenchi/outlier_detection/statistical.py - About 1 hr to fix

      Function plot_graphical_model has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def plot_graphical_model(
      Severity: Major
      Found in kenchi/plotting.py - About 50 mins to fix

        Function plot_partial_corrcoef has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def plot_partial_corrcoef(
        Severity: Major
        Found in kenchi/plotting.py - About 50 mins to fix

          Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(
          Severity: Major
          Found in kenchi/outlier_detection/reconstruction_based.py - About 50 mins to fix

            Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(
            Severity: Major
            Found in kenchi/outlier_detection/ensemble.py - About 50 mins to fix

              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(
              Severity: Minor
              Found in kenchi/metrics.py - About 45 mins to fix

                Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Minor
                Found in kenchi/outlier_detection/classification_based.py - About 45 mins to fix

                  Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __init__(
                  Severity: Minor
                  Found in kenchi/outlier_detection/distance_based.py - About 45 mins to fix

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

                        def anomaly_score(self, X=None, normalize=False):
                            """Compute the anomaly score for each sample.
                    
                            Parameters
                            ----------
                    Severity: Minor
                    Found in kenchi/outlier_detection/base.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 plot_roc_curve has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def plot_roc_curve(
                        y_true, y_score, ax=None, figsize=None,
                        filename=None, title='ROC curve', xlabel='FPR', ylabel='TPR',
                        **kwargs
                    ):
                    Severity: Minor
                    Found in kenchi/plotting.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

                    At least two spaces before inline comment
                    Open

                        from . import outlier_detection # noqa
                    Severity: Minor
                    Found in kenchi/__init__.py by pep8

                    Separate inline comments by at least two spaces.

                    An inline comment is a comment on the same line as a statement.
                    Inline comments should be separated by at least two spaces from the
                    statement. They should start with a # and a single space.
                    
                    Each line of a block comment starts with a # and a single space
                    (unless it is indented text inside the comment).
                    
                    Okay: x = x + 1  # Increment x
                    Okay: x = x + 1    # Increment x
                    Okay: # Block comment
                    E261: x = x + 1 # Increment x
                    E262: x = x + 1  #Increment x
                    E262: x = x + 1  #  Increment x
                    E265: #Block comment
                    E266: ### Block comment

                    At least two spaces before inline comment
                    Open

                        from . import pipeline # noqa
                    Severity: Minor
                    Found in kenchi/__init__.py by pep8

                    Separate inline comments by at least two spaces.

                    An inline comment is a comment on the same line as a statement.
                    Inline comments should be separated by at least two spaces from the
                    statement. They should start with a # and a single space.
                    
                    Each line of a block comment starts with a # and a single space
                    (unless it is indented text inside the comment).
                    
                    Okay: x = x + 1  # Increment x
                    Okay: x = x + 1    # Increment x
                    Okay: # Block comment
                    E261: x = x + 1 # Increment x
                    E262: x = x + 1  #Increment x
                    E262: x = x + 1  #  Increment x
                    E265: #Block comment
                    E266: ### Block comment

                    At least two spaces before inline comment
                    Open

                        from . import metrics # noqa
                    Severity: Minor
                    Found in kenchi/__init__.py by pep8

                    Separate inline comments by at least two spaces.

                    An inline comment is a comment on the same line as a statement.
                    Inline comments should be separated by at least two spaces from the
                    statement. They should start with a # and a single space.
                    
                    Each line of a block comment starts with a # and a single space
                    (unless it is indented text inside the comment).
                    
                    Okay: x = x + 1  # Increment x
                    Okay: x = x + 1    # Increment x
                    Okay: # Block comment
                    E261: x = x + 1 # Increment x
                    E262: x = x + 1  #Increment x
                    E262: x = x + 1  #  Increment x
                    E265: #Block comment
                    E266: ### Block comment

                    At least two spaces before inline comment
                    Open

                        from . import datasets # noqa
                    Severity: Minor
                    Found in kenchi/__init__.py by pep8

                    Separate inline comments by at least two spaces.

                    An inline comment is a comment on the same line as a statement.
                    Inline comments should be separated by at least two spaces from the
                    statement. They should start with a # and a single space.
                    
                    Each line of a block comment starts with a # and a single space
                    (unless it is indented text inside the comment).
                    
                    Okay: x = x + 1  # Increment x
                    Okay: x = x + 1    # Increment x
                    Okay: # Block comment
                    E261: x = x + 1 # Increment x
                    E262: x = x + 1  #Increment x
                    E262: x = x + 1  #  Increment x
                    E265: #Block comment
                    E266: ### Block comment

                    At least two spaces before inline comment
                    Open

                        from . import utils # noqa
                    Severity: Minor
                    Found in kenchi/__init__.py by pep8

                    Separate inline comments by at least two spaces.

                    An inline comment is a comment on the same line as a statement.
                    Inline comments should be separated by at least two spaces from the
                    statement. They should start with a # and a single space.
                    
                    Each line of a block comment starts with a # and a single space
                    (unless it is indented text inside the comment).
                    
                    Okay: x = x + 1  # Increment x
                    Okay: x = x + 1    # Increment x
                    Okay: # Block comment
                    E261: x = x + 1 # Increment x
                    E262: x = x + 1  #Increment x
                    E262: x = x + 1  #  Increment x
                    E265: #Block comment
                    E266: ### Block comment

                    At least two spaces before inline comment
                    Open

                        from . import plotting # noqa
                    Severity: Minor
                    Found in kenchi/__init__.py by pep8

                    Separate inline comments by at least two spaces.

                    An inline comment is a comment on the same line as a statement.
                    Inline comments should be separated by at least two spaces from the
                    statement. They should start with a # and a single space.
                    
                    Each line of a block comment starts with a # and a single space
                    (unless it is indented text inside the comment).
                    
                    Okay: x = x + 1  # Increment x
                    Okay: x = x + 1    # Increment x
                    Okay: # Block comment
                    E261: x = x + 1 # Increment x
                    E262: x = x + 1  #Increment x
                    E262: x = x + 1  #  Increment x
                    E265: #Block comment
                    E266: ### Block comment
                    Severity
                    Category
                    Status
                    Source
                    Language