Comments (2)
I have the same issue, it is driving me mad. I am trying to figure it out in the code, will let you know if I manage to fix it
from pmdarima.
I found how to deal with it, but beware, this is not an official solution by the people who made the original API, I made it to make my work easier. Also I am not sure if it will damage the overall Stepwise search or anything else, nevertheless if you don't use Stepwise, for now it does seem to work:
Go to the auto.py file by clicking on auto_arima, scroll down to "search = solvers._RandomFitWrapper", you will need to add the below to this function:
start_p=start_p,
start_q=start_q,
start_P=start_P,
start_Q=start_Q
Save it, now go to the _auto_solvers.py and search for the function "class _RandomFitWrapper(_SolverMixin):"
Substitute this function with the below:
class _RandomFitWrapper(_SolverMixin):
"""Searches for the best model using a random search"""
def __init__(self, y, X, fit_partial, d, D, m, max_order,
start_p, max_p, start_q, max_q, start_P, max_P, start_Q, max_Q, # added start_p, start_q, start_P, start_Q
random, random_state,
n_fits, n_jobs, seasonal, trace, with_intercept,
sarimax_kwargs):
if seasonal:
gen = (
((p, d, q), (P, D, Q, m))
for p in range(start_p, max_p + 1) # changed from 0 to start_p
for q in range(start_q, max_q + 1) # changed from 0 to start_q
for P in range(start_P, max_P + 1) # changed from 0 to start_P
for Q in range(start_Q, max_Q + 1) # changed from 0 to start_Q
#if p + q + P + Q <= max_order
)
else:
gen = (
((p, d, q), (0, 0, 0, 0))
for p in range(start_p, max_p + 1) # changed from 0 to start_p
for q in range(start_q, max_q + 1) # changed from 0 to start_q
#if p + q <= max_order
)
if random:
random_state = check_random_state(random_state)
gen = random_state.permutation(np.array(list(gen), dtype='object'))[:n_fits]
self.gen = gen
self.n_jobs = n_jobs
self.trace = trace
self.fit_partial = functools.partial(
fit_partial,
y=y,
X=X,
with_intercept=with_intercept,
**sarimax_kwargs,
)
Bosh, save and restart your kernel, now the autoarima will respect the start parameters. I also just tried the Stepwise, and confirm that this amateur fix doesn't work when using Stepwise.
from pmdarima.
Related Issues (20)
- Stepwise selection of exogenous features HOT 1
- LU decomposition error raised when run wine sample
- auto_arima with missing values
- Better explanation of error
- boxcox cannot de-exponentiate in a pipeline.
- auto_arima with out_of_sample_size provided returns np.array in prediction when pd.Series was given for estimation
- Can´t import pmdarima HOT 2
- Cannot install package pmdarima through pip HOT 3
- Failed to install pmdarima in Python 3.12 HOT 2
- Save search steps and metrics output on auto_arima
- predict_in_sample with exogenous variables
- AutoArima 0 mean (no intercept) with constant time series HOT 3
- Input contains NaN for a non NaN data
- Models history is kept during auto_arima training unnecessarily causing OOMs
- example_auto_arima.py run fail
- The Package `pmdarima` Is Not Compatible with Python 3.12.x on Conda Forge for Windows HOT 1
- pmdarima is incompatible with numpy>=2.0.0 HOT 5
- Adding bounds for numpy in the build requirements and Adding version for build from source
- `pip install git+https://github.com/alkaline-ml/pmdarima.git` throws `ModuleNotFoundError: No module named 'distutils.msvccompiler'` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pmdarima.