diff --git a/skpro/base/old_base.py b/skpro/base/old_base.py index f20fe3ecc..0fd467079 100644 --- a/skpro/base/old_base.py +++ b/skpro/base/old_base.py @@ -179,7 +179,7 @@ def _cached(f): Decorated function """ - @functools.lru_cache() + @functools.lru_cache def wrapper(self, *args, **kwargs): return f(self, *args, **kwargs) @@ -449,8 +449,7 @@ def ppf(self, q, *args, **kwargs): ) def lp2(self): - """ - Implements the Lp2 norm of the probability density function + r"""Implements the Lp2 norm of the probability density function. ..math:: L^2 = \int PDF(x)^2 dx @@ -698,7 +697,7 @@ class BayesianVendorInterface(VendorInterface): """ @abc.abstractmethod - @functools.lru_cache() + @functools.lru_cache def samples(self): """ Returns the predictive posterior samples diff --git a/skpro/tests/test_baselines.py b/skpro/tests/test_baselines.py index 27c49f1e8..f37a67470 100644 --- a/skpro/tests/test_baselines.py +++ b/skpro/tests/test_baselines.py @@ -20,8 +20,8 @@ def test_density_baseline(): # median prediction working? mu = np.mean(data.y_train) sigma = np.std(data.y_train) - assert (y_pred.point() == np.ones((len(data.X_test))) * mu).all() - assert (y_pred.std() == np.ones((len(data.X_test))) * sigma).all() + assert (y_pred.point() == np.ones(len(data.X_test)) * mu).all() + assert (y_pred.std() == np.ones(len(data.X_test)) * sigma).all() # pdf, cdf working? x = np.random.randint(0, 10) diff --git a/skpro/tests/test_ensemble.py b/skpro/tests/test_ensemble.py index 45fcdf96e..5a17b9712 100644 --- a/skpro/tests/test_ensemble.py +++ b/skpro/tests/test_ensemble.py @@ -1,14 +1,10 @@ -# LEGACY MODULE - TODO: remove or refactor +"""LEGACY MODULE - TODO: remove or refactor.""" import pytest from sklearn.ensemble import BaggingRegressor as ClassicBaggingRegressor -from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error as mse -from sklearn.svm import SVR from sklearn.tree import DecisionTreeRegressor -from skpro.regression.ensemble import BaggingRegressor as SkproBaggingRegressor -from skpro.regression.parametric.parametric import ParametricEstimator from skpro.workflow.manager import DataManager