Skip to content

Commit

Permalink
cache
Browse files Browse the repository at this point in the history
  • Loading branch information
flennerhag committed Jul 13, 2017
1 parent caae078 commit bd8d1ae
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions mlens/utils/tests/test_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from mlens.utils.dummy import OLS, LogisticRegression, Scale, InitMixin
from mlens.utils.dummy import ESTIMATORS, PREPROCESSING, ESTIMATORS_PROBA, \
ECM, ECM_PROBA
from mlens.utils.dummy import Data, Cache, LayerGenerator
from mlens.utils.dummy import Data, LayerGenerator

from mlens.utils import assert_correct_format
from mlens.utils.formatting import _assert_format
Expand All @@ -39,13 +39,6 @@
z[3:8] = 2
z[8:12] = 3

# Layer estimation
data = Data('stack', False, False, 2)
X_, y_ = data.get_data((5, 2), 2)
_ = data.ground_truth(X_, y_)
layer = LayerGenerator().get_layer('stack', False, False)
layer.indexer.fit(X_)


if check_estimator is not None:

Expand Down Expand Up @@ -251,7 +244,6 @@ def test_ground_truth():
[-4. , 6.28571429],
[ 3.14285714, 3.14285714]])


t, z = Data('stack', False, True).get_data((6, 2), 2)

with open(os.devnull, 'w') as f, redirect_stdout(f):
Expand All @@ -261,10 +253,3 @@ def test_ground_truth():
np.testing.assert_array_almost_equal(wf, gwf)
np.testing.assert_array_almost_equal(P, gp)
np.testing.assert_array_almost_equal(wp, gwp)


def test_cache():
"""[Utils] testing: test cache for layer estimation."""
cache = Cache(X_, y_, data)
_ = cache.layer_est(layer, 'fit')
cache.terminate()

0 comments on commit bd8d1ae

Please sign in to comment.