Skip to content

Commit

Permalink
Revert "Edited MSE internal code and unit tests"
Browse files Browse the repository at this point in the history
  • Loading branch information
celinehabashy authored Jan 15, 2025
1 parent 44afc98 commit ce9121b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 149 deletions.
140 changes: 0 additions & 140 deletions poetry.lock

This file was deleted.

5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.9"

[tool.poetry.group.dev.dependencies]
pytest = "^6.2.5"
python = "^3.9"

[tool.semantic_release]
version_toml = [
Expand Down
6 changes: 1 addition & 5 deletions src/matrics_calculator/MSE.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,5 @@ def mean_squared_error(y_true, y_pred):
>>> mean_squared_error(y_true, y_pred)
0.375
"""
if len(y_true) != len(y_pred):
raise ValueError("The lengths of y_true and y_pred must be the same.")

mse = sum((true - pred) ** 2 for true, pred in zip(y_true, y_pred)) / len(y_true)
return mse
pass

1 change: 1 addition & 0 deletions tests/test_matrics_calculator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from matrics_calculator import matrics_calculator

0 comments on commit ce9121b

Please sign in to comment.