Adding-Classification-On-Decision-Tree #17533
Annotations
7 errors
|
ruff
Process completed with exit code 1.
|
|
ruff (PLR5501):
machine_learning/decision_tree.py#L212
machine_learning/decision_tree.py:212:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
help: Convert to `elif`
|
|
ruff (SIM108):
machine_learning/decision_tree.py#L158
machine_learning/decision_tree.py:158:9: SIM108 Use ternary operator `best_score = float("inf") if self.task == "regression" else -float("inf")` instead of `if`-`else`-block
help: Replace `if`-`else`-block with `best_score = float("inf") if self.task == "regression" else -float("inf")`
|
|
ruff (E501):
machine_learning/decision_tree.py#L79
machine_learning/decision_tree.py:79:89: E501 Line too long (93 > 88)
|
|
ruff (RUF059):
machine_learning/decision_tree.py#L70
machine_learning/decision_tree.py:70:9: RUF059 Unpacked variable `classes` is never used
help: Prefix it with an underscore or any other dummy variable pattern
|
|
ruff (RUF059):
machine_learning/decision_tree.py#L57
machine_learning/decision_tree.py:57:9: RUF059 Unpacked variable `classes` is never used
help: Prefix it with an underscore or any other dummy variable pattern
|
|
ruff (I001):
machine_learning/decision_tree.py#L7
machine_learning/decision_tree.py:7:1: I001 Import block is un-sorted or un-formatted
help: Organize imports
|