GithubHelp home page GithubHelp logo

alkaline-ml / pmdarima Goto Github PK

View Code? Open in Web Editor NEW
1.5K 34.0 226.0 77.72 MB

A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function.

Home Page: https://www.alkaline-ml.com/pmdarima

License: MIT License

Shell 1.72% Python 92.98% Makefile 0.36% Jupyter Notebook 3.28% C 0.05% Cython 1.61%
arima time-series forecasting forecasting-models python econometrics pmdarima machine-learning sarimax

pmdarima's Introduction

pmdarima

PyPI version CircleCI Github Actions Status codecov Supported versions Downloads Downloads/Week

Pmdarima (originally pyramid-arima, for the anagram of 'py' + 'arima') is a statistical library designed to fill the void in Python's time series analysis capabilities. This includes:

  • The equivalent of R's auto.arima functionality
  • A collection of statistical tests of stationarity and seasonality
  • Time series utilities, such as differencing and inverse differencing
  • Numerous endogenous and exogenous transformers and featurizers, including Box-Cox and Fourier transformations
  • Seasonal time series decompositions
  • Cross-validation utilities
  • A rich collection of built-in time series datasets for prototyping and examples
  • Scikit-learn-esque pipelines to consolidate your estimators and promote productionization

Pmdarima wraps statsmodels under the hood, but is designed with an interface that's familiar to users coming from a scikit-learn background.

Installation

pip

Pmdarima has binary and source distributions for Windows, Mac and Linux (manylinux) on pypi under the package name pmdarima and can be downloaded via pip:

pip install pmdarima

conda

Pmdarima also has Mac and Linux builds available via conda and can be installed like so:

conda config --add channels conda-forge
conda config --set channel_priority strict
conda install pmdarima

Note: We do not maintain our own Conda binaries, they are maintained at https://github.com/conda-forge/pmdarima-feedstock. See that repo for further documentation on working with Pmdarima on Conda.

Quickstart Examples

Fitting a simple auto-ARIMA on the wineind dataset:

import pmdarima as pm
from pmdarima.model_selection import train_test_split
import numpy as np
import matplotlib.pyplot as plt

# Load/split your data
y = pm.datasets.load_wineind()
train, test = train_test_split(y, train_size=150)

# Fit your model
model = pm.auto_arima(train, seasonal=True, m=12)

# make your forecasts
forecasts = model.predict(test.shape[0])  # predict N steps into the future

# Visualize the forecasts (blue=train, green=forecasts)
x = np.arange(y.shape[0])
plt.plot(x[:150], train, c='blue')
plt.plot(x[150:], forecasts, c='green')
plt.show()

Wineind example

Fitting a more complex pipeline on the sunspots dataset, serializing it, and then loading it from disk to make predictions:

import pmdarima as pm
from pmdarima.model_selection import train_test_split
from pmdarima.pipeline import Pipeline
from pmdarima.preprocessing import BoxCoxEndogTransformer
import pickle

# Load/split your data
y = pm.datasets.load_sunspots()
train, test = train_test_split(y, train_size=2700)

# Define and fit your pipeline
pipeline = Pipeline([
    ('boxcox', BoxCoxEndogTransformer(lmbda2=1e-6)),  # lmbda2 avoids negative values
    ('arima', pm.AutoARIMA(seasonal=True, m=12,
                           suppress_warnings=True,
                           trace=True))
])

pipeline.fit(train)

# Serialize your model just like you would in scikit:
with open('model.pkl', 'wb') as pkl:
    pickle.dump(pipeline, pkl)
    
# Load it and make predictions seamlessly:
with open('model.pkl', 'rb') as pkl:
    mod = pickle.load(pkl)
    print(mod.predict(15))
# [25.20580375 25.05573898 24.4263037  23.56766793 22.67463049 21.82231043
# 21.04061069 20.33693017 19.70906027 19.1509862  18.6555793  18.21577243
# 17.8250318  17.47750614 17.16803394]

Availability

pmdarima is available on PyPi in pre-built Wheel files for Python 3.7+ for the following platforms:

  • Mac (64-bit)
  • Linux (64-bit manylinux)
  • Windows (64-bit)
    • 32-bit wheels are available for pmdarima versions below 2.0.0 and Python versions below 3.10

If a wheel doesn't exist for your platform, you can still pip install and it will build from the source distribution tarball, however you'll need cython>=0.29 and gcc (Mac/Linux) or MinGW (Windows) in order to build the package from source.

Note that legacy versions (<1.0.0) are available under the name "pyramid-arima" and can be pip installed via:

# Legacy warning:
$ pip install pyramid-arima
# python -c 'import pyramid;'

However, this is not recommended.

Documentation

All of your questions and more (including examples and guides) can be answered by the pmdarima documentation. If not, always feel free to file an issue.

pmdarima's People

Contributors

aaronreidsmith avatar ad1729 avatar adubpak avatar anne-decusatis avatar charlesdrotar avatar chivalry avatar chrimaho avatar christopher-siewert avatar codeananda avatar drxyzw avatar felix-hilden avatar garyforeman avatar ksunkaexp avatar mohitmunjal avatar ryanrussell avatar skyetim avatar telamonian avatar tgsmith61591 avatar tuomijal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pmdarima's Issues

Unable to install pmdarima with python 3.7

pip install pmdarima --user
Collecting pmdarima
Using cached https://files.pythonhosted.org/packages/dd/43/d204f675a1258e60fae438205c7019ad4909622982330925a668c7f1f9ae/pmdarima-1.0.0.tar.gz
Requirement already satisfied: Cython>=0.23 in /home/rejuna15/.local/lib/python3.7/site-packages (from pmdarima) (0.27.3)
Requirement already satisfied: numpy>=1.10 in /home/rejuna15/.local/lib/python3.7/site-packages (from pmdarima) (1.15.4)
Requirement already satisfied: pandas>=0.19 in /home/rejuna15/.local/lib/python3.7/site-packages (from pmdarima) (0.23.4)
Requirement already satisfied: scikit-learn>=0.17 in /home/rejuna15/.local/lib/python3.7/site-packages (from pmdarima) (0.20.1)
Requirement already satisfied: scipy>=0.9 in /home/rejuna15/.local/lib/python3.7/site-packages (from pmdarima) (1.1.0)
Requirement already satisfied: statsmodels>=0.9.0 in /home/rejuna15/.local/lib/python3.7/site-packages (from pmdarima) (0.9.0)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/rejuna15/.local/lib/python3.7/site-packages (from pandas>=0.19->pmdarima) (2.7.5)
Requirement already satisfied: pytz>=2011k in /usr/lib/python3/dist-packages (from pandas>=0.19->pmdarima) (2018.3)
Requirement already satisfied: patsy in /home/rejuna15/.local/lib/python3.7/site-packages (from statsmodels>=0.9.0->pmdarima) (0.5.1)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.5.0->pandas>=0.19->pmdarima) (1.11.0)
Building wheels for collected packages: pmdarima
Running setup.py bdist_wheel for pmdarima ... error
Complete output from command /usr/bin/python3.7 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ioa_i29w/pmdarima/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-knh_gr9k --python-tag cp37:
Partial import of pmdarima during the build process.
Requirements: ['numpy>=1.10', 'Cython>=0.23', 'scipy>=0.9', 'scikit-learn>=0.17', 'pandas>=0.19', 'statsmodels>=0.9.0']
Adding extra setuptools args
/usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-ioa_i29w/pmdarima/setup.py", line 248, in
do_setup()
File "/tmp/pip-install-ioa_i29w/pmdarima/setup.py", line 244, in do_setup
setup(**metadata)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/tmp/pip-install-ioa_i29w/pmdarima/setup.py", line 163, in configuration
config.add_subpackage(DISTNAME)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1037, in add_subpackage
caller_level = 2)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1006, in get_subpackage
caller_level = caller_level + 1)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 919, in _get_configuration_from_setup_py
('.py', 'U', 1))
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/compat/py3k.py", line 122, in npy_load_module
return importlib.machinery.SourceFileLoader(name, fn).load_module()
File "", line 407, in _check_name_wrapper
File "", line 907, in load_module
File "", line 732, in load_module
File "", line 265, in _load_module_shim
File "", line 696, in _load
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "pmdarima/setup.py", line 11, in
from pmdarima._build_utils import maybe_cythonize_extensions
ModuleNotFoundError: No module named 'pmdarima._build_utils'


Failed building wheel for pmdarima
Running setup.py clean for pmdarima
Failed to build pmdarima
Installing collected packages: pmdarima
Running setup.py install for pmdarima ... error
Complete output from command /usr/bin/python3.7 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ioa_i29w/pmdarima/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-37l5bnlx/install-record.txt --single-version-externally-managed --compile --user --prefix=:
Partial import of pmdarima during the build process.
Requirements: ['numpy>=1.10', 'Cython>=0.23', 'scipy>=0.9', 'scikit-learn>=0.17', 'pandas>=0.19', 'statsmodels>=0.9.0']
Adding extra setuptools args
/usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-ioa_i29w/pmdarima/setup.py", line 248, in
do_setup()
File "/tmp/pip-install-ioa_i29w/pmdarima/setup.py", line 244, in do_setup
setup(**metadata)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/tmp/pip-install-ioa_i29w/pmdarima/setup.py", line 163, in configuration
config.add_subpackage(DISTNAME)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1037, in add_subpackage
caller_level = 2)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1006, in get_subpackage
caller_level = caller_level + 1)
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 919, in _get_configuration_from_setup_py
('.py', 'U', 1))
File "/home/rejuna15/.local/lib/python3.7/site-packages/numpy/compat/py3k.py", line 122, in npy_load_module
return importlib.machinery.SourceFileLoader(name, fn).load_module()
File "", line 407, in _check_name_wrapper
File "", line 907, in load_module
File "", line 732, in load_module
File "", line 265, in _load_module_shim
File "", line 696, in _load
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "pmdarima/setup.py", line 11, in
from pmdarima._build_utils import maybe_cythonize_extensions
ModuleNotFoundError: No module named 'pmdarima._build_utils'

----------------------------------------

Command "/usr/bin/python3.7 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ioa_i29w/pmdarima/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-37l5bnlx/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-ioa_i29w/pmdarima/

Description

Works with python 3.6 but i need to know if support for 3.7 will be provided in the near future?

Steps/Code to Reproduce

pip install pmdarima with python version 3.7

Expected Results

Actual Results

Versions

Linux-4.15.0-42-generic-x86_64-with-Ubuntu-18.04-bionic
Python 3.7.1 (default, Oct 22 2018, 11:21:55)
[GCC 8.2.0]
NumPy 1.15.4
SciPy 1.1.0
Scikit-Learn 0.20.1
Statsmodels 0.9.0

"ValueError: operands could not be broadcast together" raised when performing CV

Description

ValueError: operands could not be broadcast together with shapes raised when performing CV.

I think this is due to this line, which happens after prediction of the held-out samples. Adding one to the length of the created exog array (i.e. model_res.model.exog = np.ones((y.shape[0]+1, 1))) seems to fix it but I'm not sure that would be the real fix.

Steps/Code to Reproduce

from pyramid.arima import auto_arima
auto_arima([33., 44., 58., 49., 46., 98., 97.], out_of_sample_size=1, seasonal=False)

Versions

Linux-4.15.0-30-generic-x86_64-with-debian-buster-sid
Python 3.5.5 (default, Jul 24 2018, 13:20:46)
[GCC 7.3.0]
Pyramid 0.7.1
NumPy 1.15.0
SciPy 1.1.0
Scikit-Learn 0.19.2
Statsmodels 0.9.0

While pip installing the package (0.8.1) for Linux 64 bit, I encounter C exception errors

The following are error traces:

^
pyramid/arima/_arima.c: In function ‘__Pyx__ExceptionSave’:
pyramid/arima/_arima.c:26129:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
*type = tstate->exc_type;
^
pyramid/arima/_arima.c:26130:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
*value = tstate->exc_value;
^
pyramid/arima/_arima.c:26131:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
*tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c: In function ‘__Pyx__ExceptionReset’:
pyramid/arima/_arima.c:26138:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
pyramid/arima/_arima.c:26139:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
pyramid/arima/_arima.c:26140:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c:26141:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
pyramid/arima/_arima.c:26142:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
pyramid/arima/_arima.c:26143:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
pyramid/arima/_arima.c: In function ‘__Pyx__GetException’:
pyramid/arima/_arima.c:26198:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
pyramid/arima/_arima.c:26199:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
pyramid/arima/_arima.c:26200:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c:26201:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
pyramid/arima/_arima.c:26202:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
pyramid/arima/_arima.c:26203:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
pyramid/arima/_arima.c: In function ‘__Pyx__ExceptionSwap’:
pyramid/arima/_arima.c:27811:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
pyramid/arima/_arima.c:27812:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
pyramid/arima/_arima.c:27813:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c:27814:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = *type;
^
pyramid/arima/_arima.c:27815:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = *value;
^
pyramid/arima/_arima.c:27816:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = *tb;
^
cc1: warning: pyramid/arima/_arima_fast_helpers.h: not a directory
In file included from /root/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
from /root/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /root/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from pyramid/arima/_arima.c:308:
/root/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
pyramid/arima/_arima.c: In function ‘__Pyx__ExceptionSave’:
pyramid/arima/_arima.c:26129:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
*type = tstate->exc_type;
^
pyramid/arima/_arima.c:26130:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
*value = tstate->exc_value;
^
pyramid/arima/_arima.c:26131:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
*tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c: In function ‘__Pyx__ExceptionReset’:
pyramid/arima/_arima.c:26138:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
pyramid/arima/_arima.c:26139:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
pyramid/arima/_arima.c:26140:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c:26141:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
pyramid/arima/_arima.c:26142:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
pyramid/arima/_arima.c:26143:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
pyramid/arima/_arima.c: In function ‘__Pyx__GetException’:
pyramid/arima/_arima.c:26198:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
pyramid/arima/_arima.c:26199:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
pyramid/arima/_arima.c:26200:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c:26201:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
pyramid/arima/_arima.c:26202:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
pyramid/arima/_arima.c:26203:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
pyramid/arima/_arima.c: In function ‘__Pyx__ExceptionSwap’:
pyramid/arima/_arima.c:27811:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
pyramid/arima/_arima.c:27812:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
pyramid/arima/_arima.c:27813:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
pyramid/arima/_arima.c:27814:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = *type;
^
pyramid/arima/_arima.c:27815:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = *value;
^
pyramid/arima/_arima.c:27816:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = *tb;
^
error: Command "gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSCIPY_MKL_H -DHAVE_CBLAS -I/root/anaconda3/lib/python3.7/site-packages/numpy/core/include -Ipyramid/arima/_arima_fast_helpers.h -I/usr/local/include -I/usr/include -I/root/anaconda3/include -I/root/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/root/anaconda3/include/python3.7m -c pyramid/arima/_arima.c -o build/temp.linux-x86_64-3.7/pyramid/arima/_arima.o -MMD -MF build/temp.linux-x86_64-3.7/pyramid/arima/_arima.o.d" failed with exit status 1

----------------------------------------

Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-l8uexday/pyramid-arima/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-9s7bpwcq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-l8uexday/pyramid-arima/

Lack of documentation

I am having hard time learning and using some of the functionality provided by the library.

For instance, how can we save the model that is returned by auto_arima, say to a file, then reuse it?
I read in quick_start_example.ipynb that models are fully picklable but it would have been great if these utilities are at least explained with a simple example, or it would be even better if a documentation is made available.

approx requirement?

conda create --name pyram_env python=3 numpy scipy scikit-learn Cython statsmodels
source activate pyram_env
python setup.py install #from this repo dir

...
Writing /home/home/miniconda3/envs/pyram_env/lib/python3.6/site-packages/pyramid-0.3-py3.6.egg-info
running install_clib
customize UnixCCompiler

python

Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from pyramid.arima import auto_arima

Traceback (most recent call last):
File "", line 1, in
File "/home/hom/install/pyramid/pyramid/arima/init.py", line 2, in
from .approx import *
File "/home/hom/install/pyramid/pyramid/arima/approx.py", line 18, in
from pyramid.arima._arima import C_Approx
ModuleNotFoundError: No module named 'pyramid.arima._arima'

^d
pip install approx
python

Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from pyramid.arima import auto_arima

Works

I'm on:
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety

Include confidence intervals in predictions

Description

This issue is related to #18, which referenced lingering include_std_err args. While statsmodels' ARMA model supports this functionality, SARIMAX does not. Opening this for the backlog in case SARIMAX ever catches up to ARMA and we can re-include these parameters in ARIMA.predict.

Could not read saved model state

Description

I have problem in loading the model from file when running the code on AWS Lambda.
The issue is that everything works fine when I'm doing this on my linux but it does not work on AWS Lambda. Meaning:

  • I'm able to create the model

  • I'm able to store the model as file

  • I'm able to load the model from file

  • I'm also able to load the model from file which is located on AWS S3 bucket

But when I deploy my code to AWS Lambda using serverless framework loading the model fails. I expect that it is related to cache folder used in pmdarima.

Steps/Code to Reproduce

This the code which loads the model from AWS S3 bucket.

import boto3
import botocore
import os
import io
import numpy as np
from io import BytesIO
from sklearn.externals import joblib

BUCKET_NAME = 'mybcucket'

# downloads model from S3 into give file(name)
def download_model_aws(to_file_name):
	bucket = boto3.resource("s3").Bucket(BUCKET_NAME)
	with BytesIO() as modelfo:
		bucket.download_fileobj(Key=to_file_name, Fileobj=modelfo)
		model = joblib.load(modelfo)
	return model

file_name = 'forecast_models/%d-forecast.pkl' % company_id
model = download_model_aws(file_name)

I have also tried setting PMDARIMA_CACHE to use AWS Lambda tmp folder like this before reading the file:
os.environ["PMDARIMA_CACHE"] = '/tmp'

However, this haven't had any effect. How could I define the cache folder?

Expected Results

The model should be loaded from file successfully.

Actual Results

Following exception is thrown:

Could not read saved model state from /home/myuser/.pyramid-arima-cache/2018-11-24_07-42-29.725501-000--9223363283404616476.pmdpkl. Does it still exist?: OSError
Traceback (most recent call last):
...
File "/var/task/main.py", line 46, in get_model
return download_model_aws(file_name)
File "/var/task/main.py", line 31, in download_model_aws
model = joblib.load(modelfo)
File "/var/task/sklearn/externals/joblib/numpy_pickle.py", line 568, in load
obj = _unpickle(fobj)
File "/var/task/sklearn/externals/joblib/numpy_pickle.py", line 508, in _unpickle
obj = unpickler.load()
File "/var/lang/lib/python3.6/pickle.py", line 1050, in load
dispatch[key[0]](self)
File "/var/task/sklearn/externals/joblib/numpy_pickle.py", line 328, in load_build
Unpickler.load_build(self)
File "/var/lang/lib/python3.6/pickle.py", line 1507, in load_build
setstate(state)
File "/var/task/pmdarima/arima/arima.py", line 587, in __setstate__
'Does it still exist?' % loc)
OSError: Could not read saved model state from /home/myuser/.pyramid-arima-cache/2018-11-24_07-42-29.725501-000--9223363283404616476.pmdpkl. Does it still exist?

Versions

I'm using python 3.6
My requirements.txt in serverless application looks like this:
numpy==1.14.5
scikit-learn==0.19.1
scipy==1.1.0
sklearn==0.0
pmdarima==1.0.0
statsmodels>=0.9.0
pandas==0.23.4
Cython>=0.23

TypeError: predict() got an unexpected keyword argument 'typ' raised during cross-validation

Description

TypeError: predict() got an unexpected keyword argument 'typ' raised when seasonal=False, CV is performed (i.e. out_of_sample_size is passed) and a d of 0 is selected by auto_arima.
I think this is because an ARMA model doesn't take a typ argument, but here typ='linear' is being passed.

Steps/Code to Reproduce

from pyramid.arima import auto_arima
import pandas
auto_arima(pandas.Series([3.0, 4.0, 1.0, 2.0, 1.0, 2.0, 0.0, 1.0, 
0.0, 0.0, 2.0, 0.0, 1.0, 1.0, 2.0, 2.0]), 
out_of_sample_size=3, seasonal=False)

Versions

Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid
Python 3.5.5 (default, Jul 24 2018, 13:20:46)
[GCC 7.3.0]
Pyramid 0.6.5
NumPy 1.15.0
SciPy 1.1.0
Scikit-Learn 0.19.2
Statsmodels 0.9.0

Feature Request: Model output as a Dictionary

Description

By outputting the model summary statistics, it will allow for passing descriptive statistics like p-value, R-squared, coefficients, the model specifications (ex. 'order = (1,1,1)'), etc... as parameters to other parts of your code. This can be useful for setting logic and thresholds for model requirements (ex. if r_sq >= 0.80).

LinAlgError: SVD did not converge when running tests with pytest

This error occurs when running py.test, but not nosetests. The current testing framework is nosetests, but it would be best to switch testing frameworks since nosetests is no longer maintained, and they suggest shifting to pytest.

Below is the stacktrace :

==================================================================================== FAILURES ====================================================================================
_________________________________________________________________________________ test_the_r_src _________________________________________________________________________________

    def test_the_r_src():
        # this is the test the R code provides
        fit = ARIMA(order=(2, 0, 1), trend='c', suppress_warnings=True).fit(abc)

        # the R code's AIC = ~135
        assert abs(135 - fit.aic()) < 1.0

        # the R code's BIC = ~145
        assert abs(145 - fit.bic()) < 1.0

        # R's coefficients:
        #     ar1      ar2     ma1    mean
        # -0.6515  -0.2449  0.8012  5.0370

        # note that statsmodels' mean is on the front, not the end.
        params = fit.params()
        assert_almost_equal(params, np.array([5.0370, -0.6515, -0.2449, 0.8012]), decimal=2)

        # > fit = forecast::auto.arima(abc, max.p=5, max.d=5, max.q=5, max.order=100, stepwise=F)
        fit = auto_arima(abc, max_p=5, max_d=5, max_q=5, max_order=100, seasonal=False,
>                        trend='c', suppress_warnings=True, error_action='ignore')

pyramid/arima/tests/test_arima.py:194:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyramid/arima/auto.py:463: in auto_arima
    for order, seasonal_order in gen)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py:758: in __call__
    while self.dispatch_one_batch(iterator):
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py:608: in dispatch_one_batch
    self._dispatch(tasks)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py:571: in _dispatch
    job = self._backend.apply_async(batch, callback=cb)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/sklearn/externals/joblib/_parallel_backends.py:109: in apply_async
    result = ImmediateResult(func)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/sklearn/externals/joblib/_parallel_backends.py:326: in __init__
    self.results = batch()
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py:131: in __call__
    return [func(*args, **kwargs) for func, args, kwargs in self.items]
pyramid/arima/auto.py:489: in _fit_arima
    .fit(x, exogenous=xreg, **fit_params)
pyramid/arima/arima.py:252: in fit
    _, self.arima_res_ = _fit_wrapper()
pyramid/arima/arima.py:246: in _fit_wrapper
    **fit_args)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/tsa/arima_model.py:969: in fit
    callback=callback, **kwargs)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/base/model.py:451: in fit
    full_output=full_output)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/base/optimizer.py:184: in _fit
    hess=hessian)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/base/optimizer.py:378: in _fit_lbfgs
    **extra_kwargs)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/scipy/optimize/lbfgsb.py:193: in fmin_l_bfgs_b
    **opts)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/scipy/optimize/lbfgsb.py:328: in _minimize_lbfgsb
    f, g = func_and_grad(x)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/scipy/optimize/lbfgsb.py:273: in func_and_grad
    f = fun(x, *args)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/scipy/optimize/optimize.py:292: in function_wrapper
    return function(*(wrapper_args + args))
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/base/model.py:429: in <lambda>
    f = lambda params, *args: -self.loglike(params, *args) / nobs
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/tsa/arima_model.py:790: in loglike
    return self.loglike_kalman(params, set_sigma2)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/tsa/arima_model.py:800: in loglike_kalman
    return KalmanFilter.loglike(params, self, set_sigma2)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/statsmodels/tsa/kalmanf/kalmanfilter.py:649: in loglike
    R_mat, T_mat)
statsmodels/tsa/kalmanf/kalman_loglike.pyx:342: in statsmodels.tsa.kalmanf.kalman_loglike.kalman_loglike_double (statsmodels/tsa/kalmanf/kalman_loglike.c:6510)
    ???
statsmodels/tsa/kalmanf/kalman_loglike.pyx:74: in statsmodels.tsa.kalmanf.kalman_loglike.kalman_filter_double (statsmodels/tsa/kalmanf/kalman_loglike.c:3560)
    ???
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/numpy/linalg/linalg.py:1647: in pinv
    u, s, vt = svd(a, 0)
../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/numpy/linalg/linalg.py:1389: in svd
    u, s, vt = gufunc(a, signature=signature, extobj=extobj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

err = 'invalid value', flag = 8

    def _raise_linalgerror_svd_nonconvergence(err, flag):
>       raise LinAlgError("SVD did not converge")
E       LinAlgError: SVD did not converge

../../anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/numpy/linalg/linalg.py:99: LinAlgError
================================================================================ warnings summary ================================================================================
pyramid/arima/tests/test_arima.py::test_the_r_src
  /Users/charlesdrotar/anaconda2/envs/pyramid_2-7/lib/python2.7/site-packages/scipy/linalg/basic.py:1018: RuntimeWarning: internal gelsd driver lwork query error, required iwork dimension not returned. This is likely the result of LAPACK bug 0038, fixed in LAPACK 3.2.2 (released July 21, 2010). Falling back to 'gelss' driver.
    warnings.warn(mesg, RuntimeWarning)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
================================================================ 1 failed, 33 passed, 1 warnings in 26.81 seconds ================================================================

my environment (Python 2.7):

cov-core==1.15.0
coverage==4.4.1
Cython==0.25.2
nose==1.3.7
nose-cov==1.6
nose-timer==0.7.0
numpy==1.13.0
ordereddict==1.1
pandas==0.20.2
patsy==0.4.1
py==1.4.34
-e git+https://github.com/tgsmith61591/pyramid.git@8bcd98729d46eafd112c628329a277703273cdb8#egg=pyramid
pytest==3.1.1
pytest-cov==2.5.1
python-dateutil==2.6.0
pytz==2017.2
PyYAML==3.12
scikit-learn==0.18.1
scipy==0.19.0
selenium==3.4.3
six==1.10.0
statsmodels==0.8.0
termcolor==1.1.0
xmltodict==0.11.0

Add requirements.txt to installation steps.

So it appears that using a fresh environment will cause errors in the installation process given that the requirements.txt is not mentioned within the installation section of the README.md. Although the preceding section has the basic requirements there, I feel this section should be as streamlined as possible to facilitate users who are not just conda users.

I think this is 👍 for virtual envs.

Versioned documentation

Current state

As of version 1.0.0, we're only building/deploying documentation on master, and only for the latest version. See:

http://alkaline-ml.com/pmdarima

Ideal state

I'd like us to start building versioned documentation such that every new release becomes latest, and all previous releases land in a versioned subdirectory of the documentation website. This happened by default when we hosted on readthedocs, but with our more new, more complicated build, and desire for a custom domain, RTD wasn't cutting it.

The solution will entail:

  • Latest release doc deployed to alkaline-ml.com/pmdarima/
  • Latest release doc deployed to alkaline-ml.com/pmdarima/<version>/
  • We build documentation also for develop located at alkaline-ml.com/pmdarima/develop/

Steps to solve

  1. When we build gh-pages releases on Circle, we'll move the existing HTML artifacts into a new subdirectory called "<VERSION>", which means we'll need to land a VERSION file in the branch for every build on master.
  2. Every develop build will re-deploy the develop ("bleeding edge") doc

As an added feature, I'd like us to include the last two-to-three version of both pmdarima and pyramid-arima for those legacy users out there. This would be a one-time build & push from the existing release branches, and would later be automated.

MaybeEncodingError while following example notebook

Description

Example: MaybeEncodingError raised when following example notebook

Steps/Code to Reproduce

# coding: utf-8

# In[1]:


import numpy as np
import pyramid

print('numpy version: %r' % np.__version__)
print('pyramid version: %r' % pyramid.__version__)


# In[2]:


# this is a dataset from R
wineind = np.array([
    # Jan    Feb    Mar    Apr    May    Jun    Jul    Aug    Sep    Oct    Nov    Dec
    15136, 16733, 20016, 17708, 18019, 19227, 22893, 23739, 21133, 22591, 26786, 29740, 
    15028, 17977, 20008, 21354, 19498, 22125, 25817, 28779, 20960, 22254, 27392, 29945, 
    16933, 17892, 20533, 23569, 22417, 22084, 26580, 27454, 24081, 23451, 28991, 31386, 
    16896, 20045, 23471, 21747, 25621, 23859, 25500, 30998, 24475, 23145, 29701, 34365, 
    17556, 22077, 25702, 22214, 26886, 23191, 27831, 35406, 23195, 25110, 30009, 36242, 
    18450, 21845, 26488, 22394, 28057, 25451, 24872, 33424, 24052, 28449, 33533, 37351, 
    19969, 21701, 26249, 24493, 24603, 26485, 30723, 34569, 26689, 26157, 32064, 38870, 
    21337, 19419, 23166, 28286, 24570, 24001, 33151, 24878, 26804, 28967, 33311, 40226, 
    20504, 23060, 23562, 27562, 23940, 24584, 34303, 25517, 23494, 29095, 32903, 34379, 
    16991, 21109, 23740, 25552, 21752, 20294, 29009, 25500, 24166, 26960, 31222, 38641, 
    14672, 17543, 25453, 32683, 22449, 22316, 27595, 25451, 25421, 25288, 32568, 35110, 
    16052, 22146, 21198, 19543, 22084, 23816, 29961, 26773, 26635, 26972, 30207, 38687, 
    16974, 21697, 24179, 23757, 25013, 24019, 30345, 24488, 25156, 25650, 30923, 37240, 
    17466, 19463, 24352, 26805, 25236, 24735, 29356, 31234, 22724, 28496, 32857, 37198, 
    13652, 22784, 23565, 26323, 23779, 27549, 29660, 23356]
).astype(np.float64)


# In[3]:


from pyramid.arima import ARIMA

fit = ARIMA(order=(1, 1, 1), seasonal_order=(0, 1, 1, 12)).fit(y=wineind)


# In[4]:


fit = ARIMA(order=(1, 1, 1), seasonal_order=None).fit(y=wineind)


# In[5]:


# fitting a stepwise model:
from pyramid.arima import auto_arima

stepwise_fit = auto_arima(wineind, start_p=1, start_q=1, max_p=3, max_q=3, m=12,
                          start_P=0, seasonal=True, d=1, D=1, trace=True,
                          error_action='ignore',  # don't want to know if an order does not work
                          suppress_warnings=True,  # don't want convergence warnings
                          stepwise=True)  # set to stepwise

stepwise_fit.summary()


# In[7]:


rs_fit = auto_arima(wineind, start_p=1, start_q=1, max_p=3, max_q=3, m=12,
                    start_P=0, seasonal=True, n_jobs=-1, d=1, D=1, trace=True,
                    error_action='ignore',  # don't want to know if an order does not work
                    suppress_warnings=True,  # don't want convergence warnings
                    stepwise=False, random=True, random_state=42,  # we can fit a random search (not exhaustive)
                    n_fits=25)
					
"""
---------------------------------------------------------------------------
MaybeEncodingError                        Traceback (most recent call last)
<ipython-input-7-a8c602c556a4> in <module>()
      4                     suppress_warnings=True,  # don't want convergence warnings
      5                     stepwise=False, random=True, random_state=42,  # we can fit a random search (not exhaustive)
----> 6                     n_fits=25)
      7 
      8 rs_fit.summary()

~\Anaconda3\envs\major_project\lib\site-packages\pyramid\arima\auto.py in auto_arima(y, exogenous, start_p, d, start_q, max_p, max_d, max_q, start_P, D, start_Q, max_P, max_D, max_Q, max_order, m, seasonal, stationary, information_criterion, alpha, test, seasonal_test, stepwise, n_jobs, start_params, trend, method, transparams, solver, maxiter, disp, callback, offset_test_args, seasonal_test_args, suppress_warnings, error_action, trace, random, random_state, n_fits, return_valid_fits, out_of_sample_size, scoring, scoring_args, **fit_args)
    574                                 out_of_sample_size=out_of_sample_size,
    575                                 scoring=scoring, scoring_args=scoring_args)
--> 576             for order, seasonal_order in gen)
    577 
    578     # otherwise, we're fitting the stepwise algorithm...

~\Anaconda3\envs\major_project\lib\site-packages\sklearn\externals\joblib\parallel.py in __call__(self, iterable)
    787                 # consumption.
    788                 self._iterating = False
--> 789             self.retrieve()
    790             # Make sure that we get a last message telling us we are done
    791             elapsed_time = time.time() - self._start_time

~\Anaconda3\envs\major_project\lib\site-packages\sklearn\externals\joblib\parallel.py in retrieve(self)
    697             try:
    698                 if getattr(self._backend, 'supports_timeout', False):
--> 699                     self._output.extend(job.get(timeout=self.timeout))
    700                 else:
    701                     self._output.extend(job.get())

~\Anaconda3\envs\major_project\lib\multiprocessing\pool.py in get(self, timeout)
    642             return self._value
    643         else:
--> 644             raise self._value
    645 
    646     def _set(self, i, obj):

MaybeEncodingError: Error sending result: '[ARIMA(callback=None, disp=0, maxiter=50, method=None, order=(2, 1, 1),
   out_of_sample_size=0, scoring='mse', scoring_args={},
   seasonal_order=(0, 1, 2, 12), solver='lbfgs', start_params=None,
   suppress_warnings=True, transparams=True, trend='c')]'. Reason: 'TypeError("can't pickle statsmodels.tsa.statespace._statespace.dStatespace objects",)'

"""

-->

Expected Results

Results Obtained from following : https://www.github.com/tgsmith61591/pyramid/blob/master/examples/quick_start_example.ipynb

Versions

Windows-10-10.0.16299-SP0
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]
Pyramid 0.6.5
NumPy 1.14.0
SciPy 1.0.0
Scikit-Learn 0.19.1
Statsmodels 0.8.0

Create plotting tests that test output as well as execution

Description

It looks like we are testing that the plot is generated and not the actual contents of the plot for pmdarima.arima.tests.test_arima.test_plot_diagnostics(). Matplotlib has a way of addressing this. See example here. What we have is a good start, but we should implement the test in a way that will help catch potential plotting snafus that may randomly come up by underlying changes to matplotlib.

Steps/Code to Reproduce

python -m pytest pmdarima

Expected Results

It is expected that the execution of the test will test against a know image file.

Actual Results

At this moment there is no test against the output.

Versions

Current version using branch of pmdarima develop: 1.1.0-dev0

different results across machines

when creating different environment / across machines I noticed that auto arima returns different results despite having the same statsmodel version and pmdarima version. Are there any modules i should also take note?

In particular i am on the latest pmdarima 1.0.0 and statsmodel 0.9.0. I also noticed that with base environment vs venv, again with same module version of pmd and statsmodel, auto arima results seems to be different.

Import error from pyramid.arima

#trying to impor auto_arima using below commands:
from pyramid.arima import auto_arima

#error:
from pyramid.arima._arima import C_Approx

ImportError: cannot import name 'C_Approx'

Versions

run the following snippet and paste the output below.
Windows-7-6.1.7601-SP1
Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
Pyramid 0.6.2
NumPy 1.12.1
SciPy 1.0.0
Scikit-Learn 0.20.dev0
Statsmodels 0.8.0

How to save auto arima model ?

Thanks in Advance!

I want to save this auto arima generated results to a pkl file, but I am finding difficulty in saving it. Can anyone help ?

About arima parameter m

Description

if I want to predict daily data, how to set the arima parameter m ?

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

AttributeError: module 'pyramid' has no attribute '__version__'

Description

I was trying to read about ARIMA models via this link

https://medium.com/@josemarcialportilla/using-python-and-auto-arima-to-forecast-seasonal-time-series-90877adff03c

and while training the model i got the following error

Steps/Code to Reproduce

Expected Results

The resulting best model parameters should give us an AIC value of 1771.29.

Actual Results


AttributeError Traceback (most recent call last)
in ()
5 error_action='ignore',
6 suppress_warnings=True,
----> 7 stepwise=True)

/anaconda3/lib/python3.6/site-packages/pyramid/arima/auto.py in auto_arima(y, exogenous, start_p, d, start_q, max_p, max_d, max_q, start_P, D, start_Q, max_P, max_D, max_Q, max_order, m, seasonal, stationary, information_criterion, alpha, test, seasonal_test, stepwise, n_jobs, start_params, trend, method, transparams, solver, maxiter, disp, callback, offset_test_args, seasonal_test_args, suppress_warnings, error_action, trace, random, random_state, n_fits, return_valid_fits, out_of_sample_size, scoring, scoring_args, **fit_args)
626
627 # fit a baseline p, d, q model and then a null model
--> 628 stepwise_wrapper.fit_increment_k_cache_set(True) # p, d, q, P, D, Q
629 stepwise_wrapper.fit_increment_k_cache_set(
630 True, p=0, q=0, P=0, Q=0) # null model

/anaconda3/lib/python3.6/site-packages/pyramid/arima/auto.py in fit_increment_k_cache_set(self, expr, p, q, P, Q)
779 out_of_sample_size=self.out_of_sample_size,
780 scoring=self.scoring,
--> 781 scoring_args=self.scoring_args)
782
783 # use the orders as a key to be hashed for

/anaconda3/lib/python3.6/site-packages/pyramid/arima/auto.py in _fit_arima(x, xreg, order, seasonal_order, start_params, trend, method, transparams, solver, maxiter, disp, callback, fit_params, suppress_warnings, trace, error_action, out_of_sample_size, scoring, scoring_args)
846 out_of_sample_size=out_of_sample_size, scoring=scoring,
847 scoring_args=scoring_args)
--> 848 .fit(x, exogenous=xreg, **fit_params)
849
850 # for non-stationarity errors or singular matrices, return None

/anaconda3/lib/python3.6/site-packages/pyramid/arima/arima.py in fit(self, y, exogenous, **fit_args)
375 # As of version 0.7.2, start saving the version with the model so
376 # we can track changes over time.
--> 377 self.pkg_version_ = pyramid.version
378 return self
379

AttributeError: module 'pyramid' has no attribute 'version'

Versions

1 import pyramid; print("Pyramid", pyramid.__version__)

AttributeError: module 'pyramid' has no attribute 'version'

-->

cannot import name 'C_Approx'

Description

Earlier a similar issue was raised with a clarification that it would be solved when pyramid has a pip installation. After installing I am facing the same problems.

Steps/Code to Reproduce

from pyramid.arima install auto_arima

File "C:\Users\somasishg\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyramid\arima\approx.py", line 18, in
from pyramid.arima._arima import C_Approx

ImportError: cannot import name 'C_Approx'

I have tried from pyramid.arima import C_Approx but issue remains.

ValueError raised when predict multivariable use auto.py

Dear sir,
for the data below:
image
if I run:
p = auto_arima(np.array(data['value']), exogenous=np.array(data['wind directins']))
the error occur,
image
is there something wrong with me?
really appreciate for your help
Thanks&Best Regards

Migrate coverage reporting to Circle

Current state

Travis CI reports coverage. In the past, this has been fine, and particularly when we were straddling both version 2.7 & 3.x.

Problem

Now that various feature requests are including Matplotlib functionality (i.e., #53), we need to consider the best environment for such tests. Travis + Matplotlib has posed a headache in the past, and if we ignore the tests on Travis, we lose lots of coverage.

Solution

We should add a new job to the Circle CI workflow for Python 3.6 (on CPython, not PyPy) that includes coverage reporting. This should be pretty straight-forward.

  • Add new job python36 to Circle workflow, and enable coverage reporting
  • Remove coverage dependencies and reporting from Travis CI

Unable to pip install

I was unable to do a regular pip install due to the following:

▶ pip install pyramid-arima
Collecting pyramid-arima
  Using cached pyramid-arima-0.5.tar.gz
    Complete output from command python setup.py egg_info:
    Partial import of pyramid during the build process.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/25/vxn94kz91h3gb1m673gj1tqm0000gn/T/pip-build-si3apb7g/pyramid-arima/setup.py", line 41, in <module>
        with open('requirements.txt') as req:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

However installing from github worked fine:

▶ pip install --upgrade git+https://github.com/tgsmith61591/pyramid.git    

How do I use the "estimate_seasonal_differencing_term method" to test the seasonality in my data?

Description

I have a sequence of data, which is like following:
Month
2012-01-01 136.0
2012-02-01 134.0
2012-03-01 96.0
2012-04-01 79.0
2012-05-01 111.0
2012-06-01 106.0
2012-07-01 106.0
2012-08-01 119.0
2012-09-01 93.0
2012-10-01 112.0
2012-11-01 112.0
2012-12-01 108.0
2013-01-01 138.0
......

I want to test the seasonality in my data, and came across the pyramid package.

Steps/Code to Reproduce

What I did is:

from pyramid.arima import seasonality

seasonality_test = pyramid.arima.seasonality.CHTest(12)
seasonality_test.estimate_seasonal_differencing_term(Data)

Expected Results

Actual Results

And it gave me 0, which I assume that means no 12-month seasonality. I wonder if I called the class and used the method correctly. And if there is a way to test the seasonality term, without specifying a number (12 in my case).
Thank you!

Versions

Unable to install pyramid-arima

Collecting pyramid-arima
Using cached https://files.pythonhosted.org/packages/67/a5/7067ba4029e0caae394f2212aaa4308861330d4bd2ca083f8613737ba2ba/pyramid-arima-0.8.1.tar.gz
Requirement already satisfied: Cython>=0.23 in c:\programdata\anaconda3\lib\site-packages (from pyramid-arima) (0.28.5)
Requirement already satisfied: numpy>=1.10 in c:\programdata\anaconda3\lib\site-packages (from pyramid-arima) (1.15.1)
Requirement already satisfied: scipy>=0.9 in c:\programdata\anaconda3\lib\site-packages (from pyramid-arima) (1.1.0)
Requirement already satisfied: scikit-learn>=0.17 in c:\programdata\anaconda3\lib\site-packages (from pyramid-arima) (0.19.2)
Requirement already satisfied: pandas>=0.19 in c:\programdata\anaconda3\lib\site-packages (from pyramid-arima) (0.23.4)
Requirement already satisfied: statsmodels>=0.9.0 in c:\programdata\anaconda3\lib\site-packages (from pyramid-arima) (0.9.0)
Requirement already satisfied: python-dateutil>=2.5.0 in c:\programdata\anaconda3\lib\site-packages (from pandas>=0.19->pyramid-arima) (2.7.3)
Requirement already satisfied: pytz>=2011k in c:\programdata\anaconda3\lib\site-packages (from pandas>=0.19->pyramid-arima) (2018.5)
Requirement already satisfied: six>=1.5 in c:\programdata\anaconda3\lib\site-packages (from python-dateutil>=2.5.0->pandas>=0.19->pyramid-arima) (1.11.0)
Building wheels for collected packages: pyramid-arima
Running setup.py bdist_wheel for pyramid-arima ... error
Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\suri\AppData\Local\Temp\pip-install-lh4a6me9\pyramid-arima\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\suri\AppData\Local\Temp\pip-wheel-allnw6dn --python-tag cp37:
Partial import of pyramid during the build process.
Requirements: ['Cython>=0.23\nnumpy>=1.10\nscipy>=0.9\nscikit-learn>=0.17\npandas>=0.19\nstatsmodels>=0.9.0\n']
Adding extra setuptools args
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:/ProgramData/Anaconda3\Library\lib']
NOT AVAILABLE

blis_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries blis not found in ['C:\ProgramData\Anaconda3\lib', 'C:\', 'C:\ProgramData\Anaconda3\libs']
NOT AVAILABLE

openblas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries openblas not found in ['C:\ProgramData\Anaconda3\lib', 'C:\', 'C:\ProgramData\Anaconda3\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas not found in ['C:\ProgramData\Anaconda3\lib', 'C:\', 'C:\ProgramData\Anaconda3\libs']
NOT AVAILABLE

atlas_3_10_blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas not found in ['C:\ProgramData\Anaconda3\lib', 'C:\', 'C:\ProgramData\Anaconda3\libs']
NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in ['C:\ProgramData\Anaconda3\lib', 'C:\', 'C:\ProgramData\Anaconda3\libs']
NOT AVAILABLE

atlas_blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in ['C:\ProgramData\Anaconda3\lib', 'C:\', 'C:\ProgramData\Anaconda3\libs']
NOT AVAILABLE

accelerate_info:
NOT AVAILABLE

C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries blas not found in ['C:\ProgramData\Anaconda3\lib', 'C:\', 'C:\ProgramData\Anaconda3\libs']
NOT AVAILABLE

C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info()
blas_src_info:
NOT AVAILABLE

C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
NOT AVAILABLE

running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "pyramid.__check_build.check_build" sources
building extension "pyramid.arima.arima" sources
build_src: building npy-pkg config files
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyramid
copying pyramid\setup.py -> build\lib.win-amd64-3.7\pyramid
copying pyramid_config.py -> build\lib.win-amd64-3.7\pyramid
copying pyramid_init
.py -> build\lib.win-amd64-3.7\pyramid
creating build\lib.win-amd64-3.7\pyramid_check_build
copying pyramid_check_build\setup.py -> build\lib.win-amd64-3.7\pyramid_check_build
copying pyramid_check_build_init.py -> build\lib.win-amd64-3.7\pyramid_check_build
creating build\lib.win-amd64-3.7\pyramid_check_build\tests
copying pyramid_check_build\tests\test_check_build.py -> build\lib.win-amd64-3.7\pyramid_check_build/tests
copying pyramid_check_build\tests_init.py -> build\lib.win-amd64-3.7\pyramid_check_build/tests
creating build\lib.win-amd64-3.7\pyramid_build_utils
copying pyramid_build_utils_init
.py -> build\lib.win-amd64-3.7\pyramid_build_utils
creating build\lib.win-amd64-3.7\pyramid_build_utils\tests
copying pyramid_build_utils\tests_init
.py -> build\lib.win-amd64-3.7\pyramid_build_utils/tests
creating build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\matplotlib.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\numpy.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\pandas.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\python.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat_init
.py -> build\lib.win-amd64-3.7\pyramid\compat
creating build\lib.win-amd64-3.7\pyramid\compat\tests
copying pyramid\compat\tests\test_compat.py -> build\lib.win-amd64-3.7\pyramid\compat/tests
copying pyramid\compat\tests_init
.py -> build\lib.win-amd64-3.7\pyramid\compat/tests
creating build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\heartrate.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\lynx.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\wineind.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\woolyrnq.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets_init
.py -> build\lib.win-amd64-3.7\pyramid\datasets
creating build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\array.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\metaestimators.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\testing.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\visualization.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\wrapped.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils_init
.py -> build\lib.win-amd64-3.7\pyramid\utils
creating build\lib.win-amd64-3.7\pyramid\utils\tests
copying pyramid\utils\tests\test_array.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_meta.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_testing.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_vis.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_wrapped.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests_init
.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
creating build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\approx.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\arima.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\auto.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\seasonality.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\setup.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\stationarity.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\utils.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\warnings.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima_init
.py -> build\lib.win-amd64-3.7\pyramid\arima
creating build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_approx.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_arima.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_c_arima.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_stationarity.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests_init
.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
building 'pyramid.__check_build._check_build' extension
compiling C sources
creating build\temp.win-amd64-3.7\Release\pyramid
creating build\temp.win-amd64-3.7\Release\pyramid__check_build
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpyramid__check_build_check_build.c /Fobuild\temp.win-amd64-3.7\Release\pyramid__check_build_check_build.obj
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ProgramData\Anaconda3\libs /LIBPATH:C:\ProgramData\Anaconda3\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" /EXPORT:PyInit__check_build build\temp.win-amd64-3.7\Release\pyramid__check_build_check_build.obj /OUT:build\lib.win-amd64-3.7\pyramid__check_build_check_build.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\pyramid__check_build_check_build.cp37-win_amd64.lib
building 'pyramid.arima._arima' extension
compiling C sources
creating build\temp.win-amd64-3.7\Release\pyramid\arima
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -Ipyramid\arima_arima_fast_helpers.h -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpyramid\arima_arima.c /Fobuild\temp.win-amd64-3.7\Release\pyramid\arima_arima.obj
error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -Ipyramid\arima_arima_fast_helpers.h -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpyramid\arima_arima.c /Fobuild\temp.win-amd64-3.7\Release\pyramid\arima_arima.obj" failed with exit status 2
_arima.c
c:\programdata\anaconda3\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pyramid\arima_arima.c(2735): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima_arima.c(3162): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(3388): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(4573): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima_arima.c(5161): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'int', possible loss of data
pyramid\arima_arima.c(5161): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'double', possible loss of data
pyramid\arima_arima.c(5502): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'int', possible loss of data
pyramid\arima_arima.c(5502): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'double', possible loss of data
pyramid\arima_arima.c(5887): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima_arima.c(6106): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima_arima.c(6515): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima_arima.c(6708): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima_arima.c(6901): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima_arima.c(7094): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima_arima.c(7522): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima_arima.c(7741): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima_arima.c(8239): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(8292): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(8469): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(8533): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(8827): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(8880): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(9057): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(9121): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(9415): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(9468): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(9645): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(9709): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(10003): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(10056): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(10233): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(10297): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima_arima.c(26129): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26130): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26131): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26138): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26139): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26140): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26141): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26142): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26143): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26198): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26199): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26200): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26201): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26202): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(26203): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(27811): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(27812): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(27813): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(27814): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(27815): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima_arima.c(27816): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'


Failed building wheel for pyramid-arima
Running setup.py clean for pyramid-arima
Failed to build pyramid-arima
Installing collected packages: pyramid-arima
Running setup.py install for pyramid-arima ... error
Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\suri\AppData\Local\Temp\pip-install-lh4a6me9\pyramid-arima\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\suri\AppData\Local\Temp\pip-record-b8siatdq\install-record.txt --single-version-externally-managed --compile:
Partial import of pyramid during the build process.
Requirements: ['Cython>=0.23\nnumpy>=1.10\nscipy>=0.9\nscikit-learn>=0.17\npandas>=0.19\nstatsmodels>=0.9.0\n']
Adding extra setuptools args
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:/ProgramData/Anaconda3\Library\lib']
NOT AVAILABLE

blis_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries blis not found in ['C:\\ProgramData\\Anaconda3\\lib', 'C:\\', 'C:\\ProgramData\\Anaconda3\\libs']
  NOT AVAILABLE

openblas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries openblas not found in ['C:\\ProgramData\\Anaconda3\\lib', 'C:\\', 'C:\\ProgramData\\Anaconda3\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries tatlas not found in ['C:\\ProgramData\\Anaconda3\\lib', 'C:\\', 'C:\\ProgramData\\Anaconda3\\libs']
  NOT AVAILABLE

atlas_3_10_blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries satlas not found in ['C:\\ProgramData\\Anaconda3\\lib', 'C:\\', 'C:\\ProgramData\\Anaconda3\\libs']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries ptf77blas,ptcblas,atlas not found in ['C:\\ProgramData\\Anaconda3\\lib', 'C:\\', 'C:\\ProgramData\\Anaconda3\\libs']
  NOT AVAILABLE

atlas_blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries f77blas,cblas,atlas not found in ['C:\\ProgramData\\Anaconda3\\lib', 'C:\\', 'C:\\ProgramData\\Anaconda3\\libs']
  NOT AVAILABLE

accelerate_info:
  NOT AVAILABLE

C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  self.calc_info()
blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
  libraries blas not found in ['C:\\ProgramData\\Anaconda3\\lib', 'C:\\', 'C:\\ProgramData\\Anaconda3\\libs']
  NOT AVAILABLE

C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  self.calc_info()
blas_src_info:
  NOT AVAILABLE

C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:625: UserWarning:
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  self.calc_info()
  NOT AVAILABLE

running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "pyramid.__check_build._check_build" sources
building extension "pyramid.arima._arima" sources
build_src: building npy-pkg config files
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyramid
copying pyramid\setup.py -> build\lib.win-amd64-3.7\pyramid
copying pyramid\_config.py -> build\lib.win-amd64-3.7\pyramid
copying pyramid\__init__.py -> build\lib.win-amd64-3.7\pyramid
creating build\lib.win-amd64-3.7\pyramid\__check_build
copying pyramid\__check_build\setup.py -> build\lib.win-amd64-3.7\pyramid\__check_build
copying pyramid\__check_build\__init__.py -> build\lib.win-amd64-3.7\pyramid\__check_build
creating build\lib.win-amd64-3.7\pyramid\__check_build\tests
copying pyramid\__check_build\tests\test_check_build.py -> build\lib.win-amd64-3.7\pyramid\__check_build/tests
copying pyramid\__check_build\tests\__init__.py -> build\lib.win-amd64-3.7\pyramid\__check_build/tests
creating build\lib.win-amd64-3.7\pyramid\_build_utils
copying pyramid\_build_utils\__init__.py -> build\lib.win-amd64-3.7\pyramid\_build_utils
creating build\lib.win-amd64-3.7\pyramid\_build_utils\tests
copying pyramid\_build_utils\tests\__init__.py -> build\lib.win-amd64-3.7\pyramid\_build_utils/tests
creating build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\matplotlib.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\numpy.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\pandas.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\python.py -> build\lib.win-amd64-3.7\pyramid\compat
copying pyramid\compat\__init__.py -> build\lib.win-amd64-3.7\pyramid\compat
creating build\lib.win-amd64-3.7\pyramid\compat\tests
copying pyramid\compat\tests\test_compat.py -> build\lib.win-amd64-3.7\pyramid\compat/tests
copying pyramid\compat\tests\__init__.py -> build\lib.win-amd64-3.7\pyramid\compat/tests
creating build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\heartrate.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\lynx.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\wineind.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\woolyrnq.py -> build\lib.win-amd64-3.7\pyramid\datasets
copying pyramid\datasets\__init__.py -> build\lib.win-amd64-3.7\pyramid\datasets
creating build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\array.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\metaestimators.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\testing.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\visualization.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\wrapped.py -> build\lib.win-amd64-3.7\pyramid\utils
copying pyramid\utils\__init__.py -> build\lib.win-amd64-3.7\pyramid\utils
creating build\lib.win-amd64-3.7\pyramid\utils\tests
copying pyramid\utils\tests\test_array.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_meta.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_testing.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_vis.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\test_wrapped.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
copying pyramid\utils\tests\__init__.py -> build\lib.win-amd64-3.7\pyramid\utils/tests
creating build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\approx.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\arima.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\auto.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\seasonality.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\setup.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\stationarity.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\utils.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\warnings.py -> build\lib.win-amd64-3.7\pyramid\arima
copying pyramid\arima\__init__.py -> build\lib.win-amd64-3.7\pyramid\arima
creating build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_approx.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_arima.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_c_arima.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\test_stationarity.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
copying pyramid\arima\tests\__init__.py -> build\lib.win-amd64-3.7\pyramid\arima\tests
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
building 'pyramid.__check_build._check_build' extension
compiling C sources
creating build\temp.win-amd64-3.7\Release\pyramid
creating build\temp.win-amd64-3.7\Release\pyramid\__check_build
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpyramid\__check_build\_check_build.c /Fobuild\temp.win-amd64-3.7\Release\pyramid\__check_build\_check_build.obj
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ProgramData\Anaconda3\libs /LIBPATH:C:\ProgramData\Anaconda3\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" /EXPORT:PyInit__check_build build\temp.win-amd64-3.7\Release\pyramid\__check_build\_check_build.obj /OUT:build\lib.win-amd64-3.7\pyramid\__check_build\_check_build.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\pyramid\__check_build\_check_build.cp37-win_amd64.lib
building 'pyramid.arima._arima' extension
compiling C sources
creating build\temp.win-amd64-3.7\Release\pyramid\arima
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -Ipyramid\arima\_arima_fast_helpers.h -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpyramid\arima\_arima.c /Fobuild\temp.win-amd64-3.7\Release\pyramid\arima\_arima.obj
error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -Ipyramid\arima\_arima_fast_helpers.h -IC:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpyramid\arima\_arima.c /Fobuild\temp.win-amd64-3.7\Release\pyramid\arima\_arima.obj" failed with exit status 2
_arima.c
c:\programdata\anaconda3\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pyramid\arima\_arima.c(2735): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima\_arima.c(3162): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(3388): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(4573): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima\_arima.c(5161): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'int', possible loss of data
pyramid\arima\_arima.c(5161): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'double', possible loss of data
pyramid\arima\_arima.c(5502): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'int', possible loss of data
pyramid\arima\_arima.c(5502): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'double', possible loss of data
pyramid\arima\_arima.c(5887): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima\_arima.c(6106): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima\_arima.c(6515): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima\_arima.c(6708): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima\_arima.c(6901): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima\_arima.c(7094): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
pyramid\arima\_arima.c(7522): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima\_arima.c(7741): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
pyramid\arima\_arima.c(8239): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(8292): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(8469): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(8533): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(8827): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(8880): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(9057): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(9121): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(9415): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(9468): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(9645): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(9709): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(10003): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(10056): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(10233): warning C4244: '=': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(10297): warning C4244: 'function': conversion from '__pyx_t_7pyramid_5arima_6_arima_INTP' to 'long', possible loss of data
pyramid\arima\_arima.c(26129): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26130): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26131): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26138): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26139): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26140): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26141): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26142): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26143): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26198): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26199): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26200): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26201): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26202): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(26203): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(27811): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(27812): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(27813): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(27814): error C2039: 'exc_type': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(27815): error C2039: 'exc_value': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
pyramid\arima\_arima.c(27816): error C2039: 'exc_traceback': is not a member of '_ts'
c:\programdata\anaconda3\include\pystate.h(209): note: see declaration of '_ts'

----------------------------------------

Command "C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\suri\AppData\Local\Temp\pip-install-lh4a6me9\pyramid-arima\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\suri\AppData\Local\Temp\pip-record-b8siatdq\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\suri\AppData\Local\Temp\pip-install-lh4a6me9\pyramid-arima\

save or access auto_arima trace history?

Hi,

I can't quite see if this exists, seems not. It would be nice to be able to save or access the output of the auto_arima trace (since it contains BIC, AIC information for other candidate models)...

I.e. this information:

Fit ARIMA: order=(2, 1, 2) seasonal_order=(1, 0, 1, 52); AIC=4650.194, BIC=4678.269, Fit time=12.474 seconds
Fit ARIMA: order=(0, 1, 0) seasonal_order=(0, 0, 0, 52); AIC=4679.831, BIC=4686.850, Fit time=0.023 seconds
Fit ARIMA: order=(1, 1, 0) seasonal_order=(1, 0, 0, 52); AIC=4671.975, BIC=4686.013, Fit time=0.932 seconds
Fit ARIMA: order=(0, 1, 1) seasonal_order=(0, 0, 1, 52); AIC=4672.122, BIC=4686.160, Fit time=1.123 seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(0, 0, 1, 52); AIC=4649.877, BIC=4674.443, Fit time=9.644 seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(0, 0, 0, 52); AIC=4659.435, BIC=4680.491, Fit time=0.794 seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(0, 0, 2, 52); AIC=nan, BIC=nan, Fit time=nan seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(1, 0, 2, 52); AIC=nan, BIC=nan, Fit time=nan seconds
Fit ARIMA: order=(1, 1, 2) seasonal_order=(0, 0, 1, 52); AIC=4650.274, BIC=4671.330, Fit time=10.117 seconds
Fit ARIMA: order=(3, 1, 2) seasonal_order=(0, 0, 1, 52); AIC=nan, BIC=nan, Fit time=nan seconds
Fit ARIMA: order=(2, 1, 1) seasonal_order=(0, 0, 1, 52); AIC=4650.687, BIC=4671.743, Fit time=15.710 seconds
Fit ARIMA: order=(2, 1, 3) seasonal_order=(0, 0, 1, 52); AIC=4652.046, BIC=4680.121, Fit time=23.327 seconds
Fit ARIMA: order=(1, 1, 1) seasonal_order=(0, 0, 1, 52); AIC=4650.386, BIC=4667.933, Fit time=5.807 seconds
Fit ARIMA: order=(3, 1, 3) seasonal_order=(0, 0, 1, 52); AIC=4652.556, BIC=4684.140, Fit time=21.198 seconds
Total fit time: 101.177 seconds

Is this possible?

thanks!
best,

Error fitting model

Description

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

Multiple predictors for pyramid.arima.auto_arima()

Hi,

I am trying to get auto_arima to work with multiple predictors.
I was using auto.arima() in R, it has xreg parameter which allow the user to put in multiple predictors for the model.

Is this functionality available in the current version of pyramid.arima.auto_arima?

Thank you,
T

remove matplotlib as a dependency

Can we please remove the matplotlib dependency? I do not use it in my applications and I don't want this to be a dependency of the environment I am maintaining.

Serve pyramid on pypi

We need to streamline the installation, so naturally the move to serving pyramid on pypi makes sense to reduce the need for assumptions in the installation process about the underlying environment.

Conceivably this could be served as a single wheel as h2o does with multiple versions of python, operating systems, and architectures supported or possibly as series of wheels as numpy, scikit-learn or pandas does with separate OS versions, python versions, and architectures getting their own wheels.

Not sure what the most elegant solution is. Maybe trying to serve the following 6 major wheels makes the most sense:

  • os: MAC 64-bit architecture
    • [in pypitest] python: 2.7
    • [in pypitest] python: 3.5
    • [in pypitest] python: 2.6
  • os: Linux 64-bit architecture
    • python: 2.7
    • python: 3.5
    • python: 2.6

<OS> <os_version> using Python <major_version>.<minor_version>

  • 1.) serve the package on the pypi test server, then:
  • 2.) test install from pypi test server
    • a. with requirements already installed:
      • anaconda
      • virtualenv
    • b. with requirements not already installed:
      • anaconda
      • virtualenv
    • c. with conflicting versions:
      • anaconda
      • virtualenv
  • 3.) serve the package publicly

No Intercept

Description

Would like to be able to run the models without an intercept by having a 'no intercept' option. I looked through the documentation and did not see a way to do this. Thanks.

Error installing on Python 3.7

Hi, ran into problems trying to install pyramid.

Running Mojave 10.14. Other packages are installing just fine.

Alexeys-MacBook-Pro:~ alexeyryabushko$ pip install pyramid-arima
Collecting pyramid-arima
  Using cached https://files.pythonhosted.org/packages/67/a5/7067ba4029e0caae394f2212aaa4308861330d4bd2ca083f8613737ba2ba/pyramid-arima-0.8.1.tar.gz
Requirement already satisfied: Cython>=0.23 in ./anaconda3/lib/python3.7/site-packages (from pyramid-arima) (0.29)
Requirement already satisfied: numpy>=1.10 in ./anaconda3/lib/python3.7/site-packages (from pyramid-arima) (1.15.4)
Requirement already satisfied: scipy>=0.9 in ./anaconda3/lib/python3.7/site-packages (from pyramid-arima) (1.1.0)
Requirement already satisfied: scikit-learn>=0.17 in ./anaconda3/lib/python3.7/site-packages (from pyramid-arima) (0.20.0)
Requirement already satisfied: pandas>=0.19 in ./anaconda3/lib/python3.7/site-packages (from pyramid-arima) (0.23.4)
Requirement already satisfied: statsmodels>=0.9.0 in ./anaconda3/lib/python3.7/site-packages (from pyramid-arima) (0.9.0)
Requirement already satisfied: python-dateutil>=2.5.0 in ./anaconda3/lib/python3.7/site-packages (from pandas>=0.19->pyramid-arima) (2.7.5)
Requirement already satisfied: pytz>=2011k in ./anaconda3/lib/python3.7/site-packages (from pandas>=0.19->pyramid-arima) (2018.7)
Requirement already satisfied: six>=1.5 in ./anaconda3/lib/python3.7/site-packages (from python-dateutil>=2.5.0->pandas>=0.19->pyramid-arima) (1.11.0)
Building wheels for collected packages: pyramid-arima
  Running setup.py bdist_wheel for pyramid-arima ... error
  Complete output from command /Users/alexeyryabushko/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qg/rqfkpy7s2l35tdcbg9t2hv7w0000gn/T/pip-install-tpdlxypu/pyramid-arima/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/qg/rqfkpy7s2l35tdcbg9t2hv7w0000gn/T/pip-wheel-ftifmen9 --python-tag cp37:
  Partial import of pyramid during the build process.
  Requirements: ['Cython>=0.23', 'numpy>=1.10', 'scipy>=0.9', 'scikit-learn>=0.17', 'pandas>=0.19', 'statsmodels>=0.9.0']
  Adding extra setuptools args
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    FOUND:
      libraries = ['mkl_rt', 'pthread']
      library_dirs = ['/Users/alexeyryabushko/anaconda3/lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['/Users/alexeyryabushko/anaconda3/include']
  
    FOUND:
      libraries = ['mkl_rt', 'pthread']
      library_dirs = ['/Users/alexeyryabushko/anaconda3/lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['/Users/alexeyryabushko/anaconda3/include']
  
  running bdist_wheel
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  running build_src
  build_src
  building extension "pyramid.__check_build._check_build" sources
  building extension "pyramid.arima._arima" sources
  build_src: building npy-pkg config files
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.7
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid
  copying pyramid/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid
  copying pyramid/setup.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid
  copying pyramid/_config.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build
  copying pyramid/__check_build/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build
  copying pyramid/__check_build/setup.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build/tests
  copying pyramid/__check_build/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build/tests
  copying pyramid/__check_build/tests/test_check_build.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build/tests
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils
  copying pyramid/_build_utils/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils/tests
  copying pyramid/_build_utils/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils/tests
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
  copying pyramid/compat/matplotlib.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
  copying pyramid/compat/pandas.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
  copying pyramid/compat/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
  copying pyramid/compat/numpy.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
  copying pyramid/compat/python.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/compat/tests
  copying pyramid/compat/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat/tests
  copying pyramid/compat/tests/test_compat.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat/tests
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
  copying pyramid/datasets/wineind.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
  copying pyramid/datasets/heartrate.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
  copying pyramid/datasets/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
  copying pyramid/datasets/woolyrnq.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
  copying pyramid/datasets/lynx.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
  copying pyramid/utils/wrapped.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
  copying pyramid/utils/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
  copying pyramid/utils/visualization.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
  copying pyramid/utils/metaestimators.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
  copying pyramid/utils/testing.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
  copying pyramid/utils/array.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
  copying pyramid/utils/tests/test_vis.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
  copying pyramid/utils/tests/test_array.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
  copying pyramid/utils/tests/test_wrapped.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
  copying pyramid/utils/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
  copying pyramid/utils/tests/test_meta.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
  copying pyramid/utils/tests/test_testing.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/approx.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/stationarity.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/warnings.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/setup.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/utils.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/seasonality.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/arima.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  copying pyramid/arima/auto.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
  creating build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
  copying pyramid/arima/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
  copying pyramid/arima/tests/test_arima.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
  copying pyramid/arima/tests/test_c_arima.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
  copying pyramid/arima/tests/test_approx.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
  copying pyramid/arima/tests/test_stationarity.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
  running build_ext
  customize UnixCCompiler
  customize UnixCCompiler using build_ext
  building 'pyramid.__check_build._check_build' extension
  compiling C sources
  C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/alexeyryabushko/anaconda3/include -arch x86_64 -I/Users/alexeyryabushko/anaconda3/include -arch x86_64
  
  creating build/temp.macosx-10.7-x86_64-3.7/pyramid
  creating build/temp.macosx-10.7-x86_64-3.7/pyramid/__check_build
  compile options: '-I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/include/python3.7m -c'
  gcc: pyramid/__check_build/_check_build.c
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/alexeyryabushko/anaconda3/include -arch x86_64 -I/Users/alexeyryabushko/anaconda3/include -arch x86_64 -I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/include/python3.7m -c pyramid/__check_build/_check_build.c -o build/temp.macosx-10.7-x86_64-3.7/pyramid/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.7-x86_64-3.7/pyramid/__check_build/_check_build.o.d" failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for pyramid-arima
  Running setup.py clean for pyramid-arima
Failed to build pyramid-arima
Installing collected packages: pyramid-arima
  Running setup.py install for pyramid-arima ... error
    Complete output from command /Users/alexeyryabushko/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qg/rqfkpy7s2l35tdcbg9t2hv7w0000gn/T/pip-install-tpdlxypu/pyramid-arima/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/qg/rqfkpy7s2l35tdcbg9t2hv7w0000gn/T/pip-record-7w6sh5bk/install-record.txt --single-version-externally-managed --compile:
    Partial import of pyramid during the build process.
    Requirements: ['Cython>=0.23', 'numpy>=1.10', 'scipy>=0.9', 'scikit-learn>=0.17', 'pandas>=0.19', 'statsmodels>=0.9.0']
    Adding extra setuptools args
    blas_opt_info:
    blas_mkl_info:
    customize UnixCCompiler
      FOUND:
        libraries = ['mkl_rt', 'pthread']
        library_dirs = ['/Users/alexeyryabushko/anaconda3/lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['/Users/alexeyryabushko/anaconda3/include']
    
      FOUND:
        libraries = ['mkl_rt', 'pthread']
        library_dirs = ['/Users/alexeyryabushko/anaconda3/lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['/Users/alexeyryabushko/anaconda3/include']
    
    running install
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building extension "pyramid.__check_build._check_build" sources
    building extension "pyramid.arima._arima" sources
    build_src: building npy-pkg config files
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.7
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid
    copying pyramid/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid
    copying pyramid/setup.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid
    copying pyramid/_config.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build
    copying pyramid/__check_build/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build
    copying pyramid/__check_build/setup.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build/tests
    copying pyramid/__check_build/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build/tests
    copying pyramid/__check_build/tests/test_check_build.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/__check_build/tests
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils
    copying pyramid/_build_utils/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils/tests
    copying pyramid/_build_utils/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/_build_utils/tests
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
    copying pyramid/compat/matplotlib.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
    copying pyramid/compat/pandas.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
    copying pyramid/compat/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
    copying pyramid/compat/numpy.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
    copying pyramid/compat/python.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/compat/tests
    copying pyramid/compat/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat/tests
    copying pyramid/compat/tests/test_compat.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/compat/tests
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
    copying pyramid/datasets/wineind.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
    copying pyramid/datasets/heartrate.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
    copying pyramid/datasets/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
    copying pyramid/datasets/woolyrnq.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
    copying pyramid/datasets/lynx.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/datasets
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
    copying pyramid/utils/wrapped.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
    copying pyramid/utils/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
    copying pyramid/utils/visualization.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
    copying pyramid/utils/metaestimators.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
    copying pyramid/utils/testing.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
    copying pyramid/utils/array.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
    copying pyramid/utils/tests/test_vis.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
    copying pyramid/utils/tests/test_array.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
    copying pyramid/utils/tests/test_wrapped.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
    copying pyramid/utils/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
    copying pyramid/utils/tests/test_meta.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
    copying pyramid/utils/tests/test_testing.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/utils/tests
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/approx.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/stationarity.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/warnings.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/setup.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/utils.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/seasonality.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/arima.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    copying pyramid/arima/auto.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima
    creating build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
    copying pyramid/arima/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
    copying pyramid/arima/tests/test_arima.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
    copying pyramid/arima/tests/test_c_arima.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
    copying pyramid/arima/tests/test_approx.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
    copying pyramid/arima/tests/test_stationarity.py -> build/lib.macosx-10.7-x86_64-3.7/pyramid/arima/tests
    running build_ext
    customize UnixCCompiler
    customize UnixCCompiler using build_ext
    building 'pyramid.__check_build._check_build' extension
    compiling C sources
    C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/alexeyryabushko/anaconda3/include -arch x86_64 -I/Users/alexeyryabushko/anaconda3/include -arch x86_64
    
    creating build/temp.macosx-10.7-x86_64-3.7/pyramid
    creating build/temp.macosx-10.7-x86_64-3.7/pyramid/__check_build
    compile options: '-I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/include/python3.7m -c'
    gcc: pyramid/__check_build/_check_build.c
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/alexeyryabushko/anaconda3/include -arch x86_64 -I/Users/alexeyryabushko/anaconda3/include -arch x86_64 -I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/alexeyryabushko/anaconda3/include/python3.7m -c pyramid/__check_build/_check_build.c -o build/temp.macosx-10.7-x86_64-3.7/pyramid/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.7-x86_64-3.7/pyramid/__check_build/_check_build.o.d" failed with exit status 1
    
    ----------------------------------------
Command "/Users/alexeyryabushko/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qg/rqfkpy7s2l35tdcbg9t2hv7w0000gn/T/pip-install-tpdlxypu/pyramid-arima/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/qg/rqfkpy7s2l35tdcbg9t2hv7w0000gn/T/pip-record-7w6sh5bk/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/qg/rqfkpy7s2l35tdcbg9t2hv7w0000gn/T/pip-install-tpdlxypu/pyramid-arima/

Feature Request: auto_arima as a sklearn.model_selection method

First off, thank you for this package, it's great.

It appears you made pmdarima estimator classes to be compatible with sklearn, including Pipeline objects. It would be nice to have auto_arima as a sklearn.model_selection-type optimizer so it could be used in conjunction with a pipeline, unless there's something I missed in the docs. Not sure about the feasibility of this without a major refactor, but everything else seems to be in place for it.

Pip Install of Pyramid-Arima in windows (64 bit) is failing while compiling C Program

I am using Python 3.6.5 in windows machine

The following is error trace:

copying pyramid\arima\arima.py -> build\lib.win-amd64-3.6\pyramid\arima
copying pyramid\arima\auto.py -> build\lib.win-amd64-3.6\pyramid\arima
copying pyramid\arima\seasonality.py -> build\lib.win-amd64-3.6\pyramid\arim

a
copying pyramid\arima\setup.py -> build\lib.win-amd64-3.6\pyramid\arima
copying pyramid\arima\stationarity.py -> build\lib.win-amd64-3.6\pyramid\ari
ma
copying pyramid\arima\utils.py -> build\lib.win-amd64-3.6\pyramid\arima
copying pyramid\arima\warnings.py -> build\lib.win-amd64-3.6\pyramid\arima
copying pyramid\arima_init_.py -> build\lib.win-amd64-3.6\pyramid\arima
creating build\lib.win-amd64-3.6\pyramid\arima\tests
copying pyramid\arima\tests\test_approx.py -> build\lib.win-amd64-3.6\pyrami
d\arima\tests
copying pyramid\arima\tests\test_arima.py -> build\lib.win-amd64-3.6\pyramid
\arima\tests
copying pyramid\arima\tests\test_c_arima.py -> build\lib.win-amd64-3.6\pyram
id\arima\tests
copying pyramid\arima\tests\test_stationarity.py -> build\lib.win-amd64-3.6
pyramid\arima\tests
copying pyramid\arima\tests_init_.py -> build\lib.win-amd64-3.6\pyramid\a
rima\tests
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying f
rom distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
building 'pyramid.__check_build._check_build' extension
compiling C sources
creating build\temp.win-amd64-3.6\Release\pyramid
creating build\temp.win-amd64-3.6\Release\pyramid__check_build
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC
\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\Pro
gramData\Anaconda3\lib\site-packages\numpy\core\include -ID:\ProgramData\Anacond
a3\lib\site-packages\numpy\core\include -ID:\ProgramData\Anaconda3\include -ID:
ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio
2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" /Tcpyramid__check_build_che
ck_build.c /Fobuild\temp.win-amd64-3.6\Release\pyramid__check_build_check_buil
d.obj
check_build.c
d:\programdata\anaconda3\include\pyconfig.h(59): fatal error C1083: Cannot o
pen include file: 'io.h': No such file or directory
error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildToo
ls\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDE
BUG /MD -ID:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include -ID:\Pro
gramData\Anaconda3\lib\site-packages\numpy\core\include -ID:\ProgramData\Anacond
a3\include -ID:\ProgramData\Anaconda3\include -I"C:\Program Files (x86)\Microsof
t Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" /Tcpyramid_

check_build_check_build.c /Fobuild\temp.win-amd64-3.6\Release\pyramid__check_b
uild_check_build.obj" failed with exit status 2

----------------------------------------

Command "D:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;
file='D:\TEMP\8\pip-req-build-0gbcdk1r\setup.py';f=getattr(tokenize, 'op
en', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(
code, file, 'exec'))" install --record D:\TEMP\8\pip-record-u4fe8b_r\install
-record.txt --single-version-externally-managed --compile" failed with error cod

Clarify ADFTest

With statsmodels I get the same values as with R:

> adf.test(c(1, 2, 1, 2.1, 2, 2, 1, 2, 1))
Augmented Dickey-Fuller Test 
alternative: stationary 
 
Type 1: no drift no trend 
     lag    ADF p.value
[1,]   0 -0.706   0.417
[2,]   1 -0.303   0.548
[3,]   2 -0.146   0.593
Type 2: with drift no trend 
     lag   ADF p.value
[1,]   0 -4.81   0.010
[2,]   1 -1.39   0.547
[3,]   2 -1.67   0.450
Type 3: with drift and trend 
     lag   ADF p.value
[1,]   0 -4.18  0.0169
[2,]   1 -1.18  0.8843
[3,]   2 -1.02  0.9183
---- 
Note: in fact, p.value = 0.01 means p.value <= 0.01
>>> adfuller([1, 2, 1, 2.1, 2, 2, 1, 2, 1], maxlag=0, regression='c', autolag=None)[:2]
(-4.807115469086105, 5.270676650320141e-05)
>>> adfuller([1, 2, 1, 2.1, 2, 2, 1, 2, 1], maxlag=1, regression='c', autolag=None)[:2]
(-1.3941478052336627, 0.5850784962155383)
>>> adfuller([1, 2, 1, 2.1, 2, 2, 1, 2, 1], maxlag=2, regression='c', autolag=None)[:2]
(-1.6697993873971613, 0.44673603965371517)

However, with pmdarima.ADFTest I'm not sure what am I getting:

>>> ADFTest(alpha=0.05, k=2).is_stationary(np.array([1, 2, 1, 2.1, 2, 2, 1, 2, 1]))
(0.3718647834033668, False)
>>> ADFTest(alpha=0.05, k=2).is_stationary(np.array([1, 2, 1, 2.1, 2, 2, 1, 2, 1]))
(0.5754585996166532, False)

Stepwise for `auto_arima`

Add stepwise arg/process for auto_arima. This is less naïve than the parallel grid approach and should typically converge faster.

Unable to handle "nans"

Description

When the dataset contains "nans", it seems to fail. When using auto.arima in R, these are handled/omitted

Steps/Code to Reproduce

Expected Results

Ommit nans

Actual Results

Raises an "ValueError"

Versions

Windows-7-6.1.7601-SP1
Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)]
pmdarima 1.0.0
NumPy 1.15.4
SciPy 1.1.0
Scikit-Learn 0.20.0
Statsmodels 0.9.0

unable to pip install

Description

Can't pip install pyramid on Mac

Steps/Code to Reproduce

$ pip install pyramid-arima

Expected Results

Actual Results

Collecting pyramid-arima
Using cached https://files.pythonhosted.org/packages/1c/de/924c2e38c9e8b1afc18dd456d5d8bfaf4eaad44f62f3ecdce0f88ef2e9e9/pyramid-arima-0.6.5.tar.gz
Requirement already satisfied: Cython>=0.23 in /anaconda3/lib/python3.6/site-packages (from pyramid-arima) (0.27.3)
Requirement already satisfied: numpy>=1.9 in /anaconda3/lib/python3.6/site-packages (from pyramid-arima) (1.14.0)
Requirement already satisfied: scipy>=0.9 in /anaconda3/lib/python3.6/site-packages (from pyramid-arima) (1.0.0)
Requirement already satisfied: scikit-learn>=0.17 in /anaconda3/lib/python3.6/site-packages (from pyramid-arima) (0.19.1)
Requirement already satisfied: statsmodels>=0.8 in /anaconda3/lib/python3.6/site-packages (from pyramid-arima) (0.8.0)
Building wheels for collected packages: pyramid-arima
Running setup.py bdist_wheel for pyramid-arima ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/hz/y7qs_s_s64n76pxhb1h4svwm3zryz5/T/pip-install-4ipglx24/pyramid-arima/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /private/var/folders/hz/y7qs_s_s64n76pxhb1h4svwm3zryz5/T/pip-wheel-zkcz6gur --python-tag cp36:
Partial import of pyramid during the build process.
Requirements: ['Cython>=0.23', 'numpy>=1.9', 'scipy>=0.9', 'scikit-learn>=0.17', 'statsmodels>=0.8']
Adding extra setuptools args
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/include']

FOUND:
  libraries = ['mkl_rt', 'pthread']
  library_dirs = ['/anaconda3/lib']
  define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
  include_dirs = ['/anaconda3/include']

running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "pyramid.__check_build._check_build" sources
building extension "pyramid.arima._arima" sources
build_src: building npy-pkg config files
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/pyramid
copying pyramid/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid
copying pyramid/setup.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build
copying pyramid/__check_build/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build
copying pyramid/__check_build/setup.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build/tests
copying pyramid/__check_build/tests/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build/tests
copying pyramid/__check_build/tests/test_check_build.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils
copying pyramid/_build_utils/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils/tests
copying pyramid/_build_utils/tests/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
copying pyramid/compat/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
copying pyramid/compat/numpy.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
copying pyramid/compat/python.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/compat/tests
copying pyramid/compat/tests/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat/tests
copying pyramid/compat/tests/test_compat.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
copying pyramid/datasets/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
copying pyramid/datasets/lynx.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
copying pyramid/datasets/wineind.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
copying pyramid/utils/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
copying pyramid/utils/array.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
copying pyramid/utils/metaestimators.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
copying pyramid/utils/tests/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
copying pyramid/utils/tests/test_array.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
copying pyramid/utils/tests/test_meta.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/approx.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/arima.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/auto.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/seasonality.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/setup.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/stationarity.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/utils.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/warnings.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/init.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/test_approx.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/test_arima.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/test_stationarity.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'pyramid.__check_build._check_build' extension
compiling C sources
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64

creating build/temp.macosx-10.7-x86_64-3.6/pyramid
creating build/temp.macosx-10.7-x86_64-3.6/pyramid/__check_build
compile options: '-I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/include/python3.6m -c'
gcc: pyramid/__check_build/_check_build.c

error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/include/python3.6m -c pyramid/__check_build/_check_build.c -o build/temp.macosx-10.7-x86_64-3.6/pyramid/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.7-x86_64-3.6/pyramid/__check_build/_check_build.o.d" failed with exit status 127


Failed building wheel for pyramid-arima
Running setup.py clean for pyramid-arima
Failed to build pyramid-arima
Installing collected packages: pyramid-arima
Running setup.py install for pyramid-arima ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/hz/y7qs_s_s64n76pxhb1h4svwm3zryz5/T/pip-install-4ipglx24/pyramid-arima/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/hz/y7qs_s_s64n76pxhb1h4svwm3zryz5/T/pip-record-kv8jaifd/install-record.txt --single-version-externally-managed --compile:
Partial import of pyramid during the build process.
Requirements: ['Cython>=0.23', 'numpy>=1.9', 'scipy>=0.9', 'scikit-learn>=0.17', 'statsmodels>=0.8']
Adding extra setuptools args
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/anaconda3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/anaconda3/include']

  FOUND:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/anaconda3/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/anaconda3/include']

running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "pyramid.__check_build._check_build" sources
building extension "pyramid.arima._arima" sources
build_src: building npy-pkg config files
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/pyramid
copying pyramid/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid
copying pyramid/setup.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build
copying pyramid/__check_build/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build
copying pyramid/__check_build/setup.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build/tests
copying pyramid/__check_build/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build/tests
copying pyramid/__check_build/tests/test_check_build.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/__check_build/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils
copying pyramid/_build_utils/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils/tests
copying pyramid/_build_utils/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/_build_utils/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
copying pyramid/compat/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
copying pyramid/compat/numpy.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
copying pyramid/compat/python.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/compat/tests
copying pyramid/compat/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat/tests
copying pyramid/compat/tests/test_compat.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/compat/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
copying pyramid/datasets/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
copying pyramid/datasets/lynx.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
copying pyramid/datasets/wineind.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/datasets
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
copying pyramid/utils/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
copying pyramid/utils/array.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
copying pyramid/utils/metaestimators.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
copying pyramid/utils/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
copying pyramid/utils/tests/test_array.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
copying pyramid/utils/tests/test_meta.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/utils/tests
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/approx.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/arima.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/auto.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/seasonality.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/setup.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/stationarity.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/utils.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
copying pyramid/arima/warnings.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima
creating build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/test_approx.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/test_arima.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
copying pyramid/arima/tests/test_stationarity.py -> build/lib.macosx-10.7-x86_64-3.6/pyramid/arima/tests
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'pyramid.__check_build._check_build' extension
compiling C sources
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64

creating build/temp.macosx-10.7-x86_64-3.6/pyramid
creating build/temp.macosx-10.7-x86_64-3.6/pyramid/__check_build
compile options: '-I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/include/python3.6m -c'
gcc: pyramid/__check_build/_check_build.c

error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/anaconda3/include/python3.6m -c pyramid/__check_build/_check_build.c -o build/temp.macosx-10.7-x86_64-3.6/pyramid/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.7-x86_64-3.6/pyramid/__check_build/_check_build.o.d" failed with exit status 127

----------------------------------------

Command "/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/hz/y7qs_s_s64n76pxhb1h4svwm3zryz5/T/pip-install-4ipglx24/pyramid-arima/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/hz/y7qs_s_s64n76pxhb1h4svwm3zryz5/T/pip-record-kv8jaifd/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/hz/y7qs_s_s64n76pxhb1h4svwm3zryz5/T/pip-install-4ipglx24/pyramid-arima/

Versions

import platform; print(platform.platform())
Darwin-16.7.0-x86_64-i386-64bit

import sys; print("Python", sys.version)
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]

import pyramid; print("Pyramid", pyramid.version)
pyramid not installed

import numpy; print("NumPy", numpy.version)
NumPy 1.14.0

import scipy; print("SciPy", scipy.version)
SciPy 1.0.0

import sklearn; print("Scikit-Learn", sklearn.version)
Scikit-Learn 0.19.1

import statsmodels; print("Statsmodels", statsmodels.version)
Statsmodels 0.8.0

Bad sales predictions on daily data

Description

The predictions from Auto-Arima for a daily data are almost same average value. Is there anything I am doing wrong

Steps/Code to Reproduce

item_sales_daily.xlsx

arima = auto_arima(np.array(train['sales']), start_p=1, start_q=1, d=0, max_p=5, max_q=5,
                   out_of_sample_size=5, suppress_warnings=True,
                   stepwise=True, error_action='ignore',trace=True)

preds= arima.predict(n_periods=test.shape[0],return_conf_int=False)

Expected Results

Not very similar predictionss

Actual Results

Similar results for extended period of time. Values are almost same as 73,74,75. There is not trend capture. Not sure, if I am doing it correctly

Versions

Windows-10-10.0.15063
('Python', '2.7.15 |Anaconda, Inc.| (default, May 1 2018, 18:37:09) [MSC v.1500 64 bit (AMD64)]')
('Pyramid', '0.7.1')
('NumPy', '1.14.3')
('SciPy', '1.1.0')
('Scikit-Learn', '0.19.1')
('Statsmodels', '0.9.0'))

Unable to install Pyramid from a Wheel on Amazon Linux

Description

I'm unable to install Pyramid from a Wheel on an Amazon Linux EC2 machine. Based on PEP 513, a --enable-unicode flag needs to be passed when building CPython 2.x.

Steps/Code to Reproduce

$ pip install https://pypi.python.org/packages/2a/f8/ecf7714177b509d731bcc00caf0a9712fcff9f3a2166097b417a77685ca1/pyramid_arima-0.5.1-cp27-cp27m-manylinux1_x86_64.whl#md5=01d45b14bbdf3989f1785e0c6c0ff5f0
pyramid_arima-0.5.1-cp27-cp27m-manylinux1_x86_64.whl is not a supported wheel on this platform.
$ python
Python 2.7.12 (default, Sep  1 2016, 22:14:00)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip; print(pip.pep425tags.get_supported())
[('cp27', 'cp27mu', 'manylinux1_x86_64'), ('cp27', 'cp27mu', 'linux_x86_64'), ('cp27', 'none', 'manylinux1_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'manylinux1_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'), ('py20', 'none', 'any')]

Expected Results

I would expect both cp27m and cp27mu to be supported and uploaded to PyPI.

Versions

$ uname -a
Linux ip-192-168-49-73 4.4.23-31.54.amzn1.x86_64 #1 SMP Tue Oct 18 22:02:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$  lsb_release -a
LSB Version:	:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:	AmazonAMI
Description:	Amazon Linux AMI release 2016.09
Release:	2016.09
Codename:	n/a

Coefficients of exogenous variables

Hi,

My auto-ARIMA model includes exogenous variables.

When I try to print the model summary, the coefficient values, p values, z scores, etc. are not displaying for the exogenous variables included in the model.

How do I fix this?

Thanks,

Preetha

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.