src/pyepal/plotting/__init__.py
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert len(indices) > 5, "You need to use at least five points"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert isinstance(unclassified_points, np.ndarray), "The arguments must be numpy arrays"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert isinstance(y, np.ndarray), "Input array y must be a numpy array"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert y.ndim == 2, "y must be a two-dimensional numpy array"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert isinstance(y, np.ndarray), "Input array y must be a numpy array"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert len(indices) == len(observations), "The number of indices and observations must be equal"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
len(labels) == num_targets
), "If labels are provided the length of the labels list \
must equal the number of targets"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
len(y) == palinstance.number_design_points
), "Length of y must equal the size of the design space"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
y.shape[1] == palinstance.ndim
), "y needs to be a two-dimensional array which column number \
equals the number of targets"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert y.ndim == 2, "y must be a two-dimensional numpy array"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
len(y_0) == len(y_1) == len(std_0) == len(std_1) == palinstance.number_design_points
), "Make sure that the arrays have the same length"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
y.shape[1] == palinstance.ndim
), "y needs to be a two-dimensional array which \
column number equals the number of targets"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert isinstance(pareto_optimal, np.ndarray), "The arguments must be numpy arrays"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert y.ndim == 1, "Input array y must be one dimensional"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
len(y) == palinstance.number_design_points
), "Length of y must equal the size of the design space"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert isinstance(y, np.ndarray), "Input array y must be a numpy array"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
len(pareto_optimal) == len(non_pareto_points) == len(unclassified_points)
), "Make sure that the arrays have the same length"
# We need numpy arrays as we assume that we can add the arrays
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert isinstance(non_pareto_points, np.ndarray), "The arguments must be numpy arrays"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
len(y) == palinstance.number_design_points
), "Length of y must equal the size of the design space"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert isinstance(array, np.ndarray), "array must be a numpy array"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert len(labels) == num_targets
- Exclude checks
File __init__.py
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# -*- coding: utf-8 -*-
# Copyright 2020 PyePAL authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Function plot_jointplot
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def plot_jointplot( # pylint:disable=invalid-name
y: np.array,
palinstance: PALBase,
labels: Union[List[str], None] = None,
figsize: tuple = (8.0, 6.0),
- 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_learning_curve
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def plot_learning_curve( # pylint:disable=dangerous-default-value, too-many-arguments, too-many-locals
palinstance,
observations: np.ndarray,
indices: np.ndarray = None,
num_steps: int = 5,
- 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_learning_curve
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_learning_curve( # pylint:disable=dangerous-default-value, too-many-arguments, too-many-locals
Function plot_pareto_front_2d
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_pareto_front_2d( # pylint:disable=too-many-arguments, invalid-name
Function plot_bar_iterations
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_bar_iterations( # pylint:disable=invalid-name
Function plot_jointplot
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_jointplot( # pylint:disable=invalid-name
Function plot_residuals
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_residuals( # pylint:disable=invalid-name