Skip to content

Commit b17bb67

Browse files
authored
Update loss_functions.py
1 parent bb00bdc commit b17bb67

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

machine_learning/loss_functions.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -684,14 +684,9 @@ def root_mean_squared_error(y_true: np.array, y_pred: np.array) -> float:
684684
685685
>>> true_labels = np.array([100, 200, 300])
686686
>>> predicted_probs = np.array([110, 190, 310])
687-
>>> round(root_mean_squared_error(true_labels, predicted_probs), 4)
687+
>>> float(root_mean_squared_error(true_labels, predicted_probs))
688688
10.0
689689
690-
>>> true_labels = [2, 4, 6, 8]
691-
>>> predicted_probs = [3, 5, 7, 10]
692-
>>> round(root_mean_squared_error(true_labels, predicted_probs), 4)
693-
1.3228756555322954
694-
695690
>>> true_labels = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
696691
>>> predicted_probs = np.array([0.3, 0.8, 0.9, 0.2])
697692
>>> root_mean_squared_error(true_labels, predicted_probs)

0 commit comments

Comments
 (0)