embiggen/node_label_prediction/node_label_prediction_model.py
File node_label_prediction_model.py
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing abstract node label prediction model."""
from typing import Optional, Union, List, Dict, Any, Tuple
import pandas as pd
import numpy as np
import warnings
Function _evaluate
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _evaluate(
Function _evaluate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def _evaluate(
self,
graph: Graph,
train: Graph,
test: Graph,
- 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 _prepare_evaluation
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _prepare_evaluation(
Function fit
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fit(
Function split_graph_following_evaluation_schema
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def split_graph_following_evaluation_schema(