embiggen/edge_label_prediction/edge_label_prediction_model.py
File edge_label_prediction_model.py
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing abstract edge label prediction model."""
from typing import Optional, Union, List, Dict, Any, Tuple
import pandas as pd
import numpy as np
from ensmallen import Graph
Function _evaluate
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _evaluate(
Function _evaluate
has a Cognitive Complexity of 10 (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(