embiggen/utils/abstract_models/abstract_classifier_model.py
File abstract_classifier_model.py
has 2643 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing abstract classes for classification models."""
import functools
import json
import os
import platform
Consider simplifying this complex logical expression. Open
Open
if issubclass(type(node_feature), AbstractEmbeddingModel):
if skip_evaluation_biased_feature and (
cls.task_involves_edge_types()
and node_feature.can_use_edge_types()
and node_feature.is_using_edge_types()
Function _evaluate_on_single_holdout
has 24 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _evaluate_on_single_holdout(
Function evaluate
has 22 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def evaluate(
Function _train_and_evaluate_model
has 19 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _train_and_evaluate_model(
Consider simplifying this complex logical expression. Open
Open
if issubclass(node_type_feature.__class__, AbstractEmbeddingModel):
if skip_evaluation_biased_feature and (
cls.task_involves_edge_types()
and node_type_feature.is_using_edge_types()
or cls.task_involves_node_types()
Consider simplifying this complex logical expression. Open
Open
if issubclass(edge_type_feature.__class__, AbstractEmbeddingModel):
if skip_evaluation_biased_feature and (
cls.task_involves_edge_types()
and edge_type_feature.is_using_edge_types()
or cls.task_involves_edge_types()
Consider simplifying this complex logical expression. Open
Open
if issubclass(type(edge_feature), AbstractEmbeddingModel):
if skip_evaluation_biased_feature and (
cls.task_involves_edge_types()
and edge_feature.is_using_edge_types()
or cls.task_involves_node_types()
Function _evaluate
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _evaluate(
Function normalize_node_feature
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_node_feature(
Function normalize_node_features
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_node_features(
Function normalize_edge_features
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_edge_features(
Function normalize_node_type_features
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_node_type_features(
Function normalize_edge_type_feature
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_edge_type_feature(
Function _prepare_evaluation
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _prepare_evaluation(
Function normalize_edge_type_features
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_edge_type_features(
Function normalize_edge_feature
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_edge_feature(
Function normalize_node_type_feature
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize_node_type_feature(
Function _predict_proba
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _predict_proba(
Function _handle_potentially_misparametrized_features
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _handle_potentially_misparametrized_features(
Function predict
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def predict(
Function _predict
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _predict(
Function _fit
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _fit(
Function predict_proba
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def predict_proba(
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(