Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surprise GridSearchCV with Pipeline and custom Transformers #387

Open
agatr opened this issue Mar 29, 2021 · 1 comment
Open

Surprise GridSearchCV with Pipeline and custom Transformers #387

agatr opened this issue Mar 29, 2021 · 1 comment

Comments

@agatr
Copy link

agatr commented Mar 29, 2021

Description

Is it possible to use Pipeline with Surprise GridSearchCV? I've tried to create a pipeline with custom Transformers (for transforming data frame into Surprise Dataset), but the steps within Pipeline don't seem to be connected. My code:

`
def run_gs(model, data, grid_params):
pipeline = Pipeline([(('Reader Transformer', ReaderTransformer()),
('Model', model)])
grid_search = GridSearchCV(pipeline, grid_params, cv=3)
grid_search.fit(data)
return self.grid_search

`

Alternatively, is it possible to use Surprise model with 'normal' sklearn GridSearchCV? I've tried that as well, but with no luck either.

Versions

macOS-10.16-x86_64-i386-64bit
Python 3.8.5 (default, Sep 4 2020, 02:22:02)
[Clang 10.0.0 ]
surprise 1.1.1

@NicolasHug
Copy link
Owner

Hi @agatr , sorry, sklearn and surprise aren't really compatible with one-another. I assume the Pipeline you're referring to is from sklearn, but there's no support for surprise with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants