Showing 47 of 103 total issues
Function plot_learning_curve
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_learning_curve( # pylint:disable=dangerous-default-value, too-many-arguments, too-many-locals
Function _pareto_classify
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _pareto_classify( # pylint:disable=too-many-arguments, too-many-locals, too-many-branches
Function build_dense_network
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def build_dense_network(
hidden_layers: Sequence[int],
activations: Union[Sequence, str] = "erf",
w_std: float = 2.5,
b_std=1,
- 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 validate_positive_integer_list
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def validate_positive_integer_list(
seq: Any, ndim: int, parameter_name: str = "Parameter"
) -> Sequence[int]:
"""Can be used, e.g., to validate and standardize the ensemble size
and epochs input"""
- 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 _set_one_infinite_width_model
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _set_one_infinite_width_model( # pylint:disable=too-many-arguments
Function get_maxmin_samples
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_maxmin_samples( # pylint:disable=invalid-name
Function run_one_step
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_one_step( # pylint:disable=too-many-arguments
Function _get_max_wt_all
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_max_wt_all( # pylint:disable=too-many-arguments
Function plot_pareto_front_2d
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_pareto_front_2d( # pylint:disable=too-many-arguments, invalid-name
Function _train_model_picklable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _train_model_picklable(i, models, design_space, objectives, sampled):
Function build_model
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_model(
Function build_coregionalized_model
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_coregionalized_model(
Function _train_model_picklable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _train_model_picklable(i, models, design_space, objectives, sampled):
Function plot_bar_iterations
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_bar_iterations( # pylint:disable=invalid-name
Function plot_jointplot
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_jointplot( # pylint:disable=invalid-name
Function plot_residuals
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_residuals( # pylint:disable=invalid-name
Function run_one_step
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run_one_step( # pylint:disable=too-many-arguments
self,
batch_size: int = 1,
pooling_method: str = "fro",
sample_discarded: bool = 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 set_XY
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def set_XY(self, X=None, Y=None):
if isinstance(X, list):
X, _, self.output_index = util.multioutput.build_XY(X, None)
if isinstance(Y, list):
_, Y, self.output_index = util.multioutput.build_XY(Y, Y)
- 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 sample
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def sample(
self,
exclude_idx: Union[np.array, None] = None,
pooling_method: str = "fro",
sample_discarded: bool = 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 augment_design_space
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def augment_design_space( # pylint: disable=invalid-name
self, X_design: np.ndarray, classify: bool = False, clean_classify: bool = True
) -> None:
"""Add new design points to PAL instance
- 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"