[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-10-24 05:24:47 +00:00
parent d8c0b7c7b3
commit 59d3ceba27

View File

@ -14,24 +14,26 @@ To run these tests, use the following command:
import numpy as np import numpy as np
from ridge_regression import RidgeRegression from ridge_regression import RidgeRegression
def test_feature_scaling(): def test_feature_scaling():
""" """
Tests the feature_scaling function of RidgeRegression. Tests the feature_scaling function of RidgeRegression.
-------- --------
>>> model = RidgeRegression() >>> model = RidgeRegression()
>>> X = np.array([[1, 2], [2, 3], [3, 4]]) >>> X = np.array([[1, 2], [2, 3], [3, 4]])
>>> X_scaled, mean, std = model.feature_scaling(X) >>> X_scaled, mean, std = model.feature_scaling(X)
>>> np.round(X_scaled, 2) >>> np.round(X_scaled, 2)
array([[-1.22, -1.22], array([[-1.22, -1.22],
[ 0. , 0. ], [ 0. , 0. ],
[ 1.22, 1.22]]) [ 1.22, 1.22]])
>>> np.round(mean, 2) >>> np.round(mean, 2)
array([2., 3.]) array([2., 3.])
>>> np.round(std, 2) >>> np.round(std, 2)
array([0.82, 0.82]) array([0.82, 0.82])
""" """
pass pass
def test_fit(): def test_fit():
""" """
Tests the fit function of RidgeRegression Tests the fit function of RidgeRegression
@ -52,6 +54,7 @@ def test_fit():
""" """
pass pass
def test_predict(): def test_predict():
""" """
Tests the predict function of RidgeRegression Tests the predict function of RidgeRegression
@ -73,6 +76,7 @@ def test_predict():
""" """
pass pass
def test_mean_absolute_error(): def test_mean_absolute_error():
""" """
Tests the mean_absolute_error function of RidgeRegression Tests the mean_absolute_error function of RidgeRegression
@ -86,6 +90,8 @@ def test_mean_absolute_error():
""" """
pass pass
if __name__ == "__main__": if __name__ == "__main__":
import doctest import doctest
doctest.testmod() doctest.testmod()