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

s2spy Pipeline design #62

Open
BSchilperoort opened this issue Aug 2, 2022 · 1 comment
Open

s2spy Pipeline design #62

BSchilperoort opened this issue Aug 2, 2022 · 1 comment

Comments

@BSchilperoort
Copy link
Contributor

BSchilperoort commented Aug 2, 2022

To be able to support an sklearn style Pipeline (or sklearn's Pipeline itself) in which all steps can be integrated, all the fits/transformations done to the input data need to be classes with a fit & transform method.

All individual steps:

resampler = Resample(calendar)
data = resample.fit(data) # or .transform()?

detrender = Detrend(method='linear')
data = detrender.fit(data)

reducer = RGDR(series=timeseries, lag=10)
data = reducer.fit(data)

model = LinearSVC()
fit_model = model.fit(data)

These steps in a pipeline:

pipe = Pipeline([
    ('resample', resampler),
    ('detrend', detrender),
    ('apply rgdr', reducer),
    ('fit svc', model)
])
fit_model = pipe.fit(data)
@Peter9192
Copy link
Contributor

Might be good to also already think about the corresponding transform methods.

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