Showing 2,238 of 2,238 total issues
Function plot_precision_recall_n
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def plot_precision_recall_n(self,
figsize=(16, 12),
fontsize=20):
"""
Plot recall and precision curves against depth into the list.
Function test_reuse_model_random_seeds
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_reuse_model_random_seeds(grid_config, default_model_trainer):
trainer = default_model_trainer
db_engine = trainer.db_engine
project_storage = trainer.model_storage_engine.project_storage
model_storage_engine = trainer.model_storage_engine
Function create_sample_distance_table
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_sample_distance_table(engine):
ensure_db(engine)
init_engine(engine)
model_groups = {
"stable": ModelGroupFactory(model_type="myStableClassifier"),
Function _write_model_to_db
has 9 arguments (exceeds 5 allowed). Consider refactoring. Open
def _write_model_to_db(
Function feature_loi_loo
has 9 arguments (exceeds 5 allowed). Consider refactoring. Open
def feature_loi_loo(self,
Function __init__
has 9 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(
Function _plot_lines
has 9 arguments (exceeds 5 allowed). Consider refactoring. Open
def _plot_lines(frame, x_col, y_col, ax, grp_col, colordict, cat_col, styledict, alpha):
Function plot_preds_comparison
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def plot_preds_comparison(self,
param_type=None,
param=None,
model_subset=None,
figsize=(28, 16),
- 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 all_combinations
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def all_combinations(feature_groups):
"""Return all combinations of groups, excluding repeated groups
Args:
feature_groups (list) The feature groups to apply the strategy to
- 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 plot_prec_across_time
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def plot_prec_across_time(self,
param_type=None,
param=None,
metric=None,
baseline=False,
- 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 _write_model_to_db
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _write_model_to_db(
self,
class_path,
parameters,
feature_names,
- 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 best_avg_recency_weight
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def best_avg_recency_weight(
df, train_end_time, metric, parameter, curr_weight, decay_type, n=1
):
"""Pick the model with the highest average metric value so far, penalized
for relative variance as:
- 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 plot_prec_across_time
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def plot_prec_across_time(self,
Function __init__
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(
Function create_entity_date_df
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def create_entity_date_df(
Function _train_and_store_model
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def _train_and_store_model(
Function _write_to_db
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def _write_to_db(
Function process_train_task
has 8 arguments (exceeds 5 allowed). Consider refactoring. Open
def process_train_task(