Closed wouterbles closed 1 year ago
I've come across the same problem. But I found that if I downgrade to scikit-learn 1.1.3 (from 1.2.0) the problem goes away.
I have the same issue. I created a new environment and updated all libraries, so I am not sure which one causes this.
Here is the code to replicate the issue:
from pmdarima import pipeline
from pmdarima import arima
from pmdarima import preprocessing as ppc
max_p=5
max_q=5
ff_m=12
ff_k=4
n_jobs=4
trend = 'c'
train = np.array([ 53.49732848, 55.67194689, 58.38817983, 60.15814887,
60.78495554, 60.92771421, 61.30123253, 62.37336819,
64.31094699, 66.95783357, 69.91670478, 72.54269204,
73.76937463, 72.23523373, 67.0330952 , 58.5990769 ,
49.0156232 , 41.45220597, 38.91781587, 43.00469642,
53.33866198, 67.77987974, 83.06470788, 95.81475843,
103.74286951, 106.54764586, 105.90211977, 104.27736115,
103.47655163, 104.35387802, 107.59139252, 113.98787597,
123.92153058, 136.93004483, 151.58183531, 165.31885435,
175.02600621, 178.97489817, 178.31169515, 175.85739037,
173.50084961, 171.48318201, 169.87503182, 169.55511273,
171.45912256, 175.46712864])
pipe = pipeline.Pipeline([
("fourier", ppc.FourierFeaturizer(m=ff_m, k=ff_k)),
("arima", arima.AutoARIMA(stepwise=False, trace=5, error_action="ignore",
seasonal=False, # because we use Fourier
trend=trend, n_jobs=n_jobs,
max_p=max_p, max_q=max_q,
suppress_warnings=True))
])
pipe.fit(train)
pip.predict(2)
Output:
TypeError: transform() got multiple values for argument 'y'
I think this should be fixed by #532. We'll get a fixed version released so y'all aren't stuck pinning scikit to <1.2.0
I think it's because of scikit-learn new feature:
Major Feature The set_output API has been adopted by all transformers. Meta-estimators that contain transformers such as pipeline.Pipeline or compose.ColumnTransformer also define a set_output.
I just deployed version 2.0.3 (to PyPI; conda builds are maintained separately). Give that a shot and let me know if it works
Thank you @aaronreidsmith .
The bug is fixed and my code runs smoothly.
Describe the bug
When using the FourierFeaturizer or DateFeaturizer in a pipeline and calling any of the predict methods (predict_in_sample or predict) the following error is thrown:
transform() got multiple values for argument 'y'
To Reproduce
Can be reproduced by running any of the pipeline examples:
Versions
Expected Behavior
Output the model results
Actual Behavior
Error thrown:
Additional Context
No response