Python icon indicating copy to clipboard operation
Python copied to clipboard

[PYTEST WARNING] Decision tree

Open CaedenPH opened this issue 3 years ago • 0 comments

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

CaedenPH avatar Oct 16 '22 10:10 CaedenPH