Skip to content

[PYTEST WARNING] Decision tree #7302

Closed
@CaedenPH

Description

@CaedenPH

Feature description

@nbrgr @hrishi84 @cclauss Please could you resolve this warning

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  <doctest machine_learning.decision_tree.DecisionTree.mean_squared_error[2]>:1: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  /home/runner/work/Python/Python/machine_learning/decision_tree.py:148: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    squared_error_sum = np.float(0)

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  /home/runner/work/Python/Python/machine_learning/decision_tree.py:152: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    return np.float(squared_error_sum / labels.size)

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  <doctest machine_learning.decision_tree.DecisionTree.mean_squared_error[5]>:1: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

origin: #7211

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions