Skip to content

Commit

Permalink
fixed all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
basaks committed Apr 4, 2024
1 parent c3abef6 commit 6b80d69
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from uncoverml.models import (apply_masked,
apply_multiple_masked,
modelmaps)
from uncoverml.optimise.models import transformed_modelmaps
from uncoverml.optimise.models import transformed_modelmaps, no_test_support_classifiers

models = {**transformed_modelmaps, **modelmaps}

Expand Down Expand Up @@ -101,7 +101,9 @@ def test_trasnsformed_model_attr(get_transformed_model):
'multicubist',
'decisiontree',
'extratree',
'catboost'
'catboost',
'svrmulti',
* list(no_test_support_classifiers.keys())
]])
def models_supported(request):
return request.param
Expand Down
6 changes: 3 additions & 3 deletions uncoverml/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging

from affine import Affine
from uncoverml.geoio import RasterioImageSource
# from uncoverml.geoio import RasterioImageSource

log = logging.getLogger(__name__)

Expand All @@ -29,9 +29,9 @@ def construct_splits(npixels, nchunks, overlap=0):


class Image:
def __init__(self, source: RasterioImageSource,
def __init__(self, source,
chunk_idx=0, nchunks=1, overlap=0,
t_source: Optional[RasterioImageSource] = None,
t_source=None,
):
assert chunk_idx >= 0 and chunk_idx < nchunks

Expand Down
3 changes: 1 addition & 2 deletions uncoverml/optimise/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ def __init__(self, fit_intercept=True, normalize=False, copy_X=True,
target_transform = transforms.transforms[target_transform]()
self.target_transform = target_transform
super(TransformedOLS, self).__init__(fit_intercept=fit_intercept,
normalize=normalize,
copy_X=copy_X,
n_jobs=n_jobs)

Expand All @@ -308,7 +307,7 @@ def __init__(self, alpha=1.0, l1_ratio=0.5, fit_intercept=True,

super(TransformedElasticNet, self).__init__(
alpha=alpha, l1_ratio=l1_ratio, fit_intercept=fit_intercept,
normalize=normalize, precompute=precompute, max_iter=max_iter,
precompute=precompute, max_iter=max_iter,
copy_X=copy_X, tol=tol, warm_start=warm_start, positive=positive,
random_state=random_state, selection=selection
)
Expand Down

0 comments on commit 6b80d69

Please sign in to comment.