Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fkiraly committed Sep 10, 2023
1 parent 6552444 commit c0c4d50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
7 changes: 3 additions & 4 deletions skpro/base/old_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -698,7 +697,7 @@ class BayesianVendorInterface(VendorInterface):
"""

@abc.abstractmethod
@functools.lru_cache()
@functools.lru_cache
def samples(self):
"""
Returns the predictive posterior samples
Expand Down
4 changes: 2 additions & 2 deletions skpro/tests/test_baselines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions skpro/tests/test_ensemble.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down

0 comments on commit c0c4d50

Please sign in to comment.