forked from statsmodels/statsmodels
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'releases' into debian-experimental
* releases: (970 commits) REF _fit_newton use np.asarray(hess) REF: _fit_newton, add ridge_factor option, default 1e-10 REF: _fit_newton add Ridge correction to Hessian, see also statsmodels#953 Bug comment: commented out code, weigths don't sum to 1 see statsmodels#1845 CLN: TST cleanup comment, unused code. REF: "is" None (not ==) BUG: fix if alpha is scalar, TST: try standardized REF: NegativeBinomial fit_regularized, try regularized Poisson for start_params DOC: add comment in notes about not penalizing NegBin shape parameter [skip ci] TST: TestNegativeBinomialL1Compatability use desired as start_params TST: adjust test, precision and start_params (failure on TravisCI) BUG: NegativeBinomial fix aic, bic for 'geometric', adjust tests REF add k_extra to NegativeBinomial, don't count it in df_model, df_resid TST explicitely define k_extra in test class CLN: a few cosmetic changes TST fix negbin geometric test for fit_regularized CLN L1NegativeBinomialResults rename closes statsmodels#1615, remove redundant `__init__` BUG NegativeBinomial add fit_regularized closes statsmodels#1453 closes statsmodels#1454 adjust test to handle extra parameter REF: has_constant remove special code in linear_model, is moved to data Fix const_idx with multiple const, more tests ...
- Loading branch information
Showing
757 changed files
with
66,487 additions
and
12,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,5 @@ help | |
|
||
# Project specific | ||
statsmodels/version.py | ||
cythonize.dat | ||
statsmodels.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Adapted from M. Brett's .yaml file for nipy: | ||
# https://github.com/nipy/nipy/blob/master/.travis.yml | ||
# | ||
# We pretend to be erlang because we can't use the python support in | ||
# travis-ci; it uses virtualenvs, they do not have numpy, scipy, matplotlib, | ||
# and it is impractical to build them | ||
language: erlang | ||
notifications: | ||
email: | ||
- statsmodels-commits@googlegroups.com | ||
env: | ||
# Enable python 2 and python 3 builds. Python3.2 available in Ubuntu 12.04. | ||
- PYTHON=python PYSUF='' | ||
- PYTHON=python3 PYSUF=3 | ||
install: | ||
- sudo apt-get update | ||
- sudo apt-get install $PYTHON-dev | ||
- sudo apt-get install $PYTHON-numpy | ||
- sudo apt-get install $PYTHON-scipy | ||
- sudo apt-get install $PYTHON-setuptools | ||
- sudo apt-get install $PYTHON-nose | ||
# Cython needs manual install under Python 3 | ||
- if [ "${PYSUF}" == "3" ]; then | ||
wget http://cython.org/release/Cython-0.17.1.tar.gz ; | ||
tar xfvz Cython-0.17.1.tar.gz ; | ||
cd Cython-0.17.1 ; | ||
sudo python3 setup.py install ; | ||
cd .. ; | ||
else | ||
sudo apt-get install cython ; | ||
fi | ||
- echo ${DISTRIB_CODENAME} | ||
- wget -O- http://neuro.debian.net/lists/precise.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list | ||
- sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9 | ||
- sudo apt-get update -qq | ||
- sudo apt-get install $PYTHON-dateutil | ||
- sudo apt-get --no-install-recommends install $PYTHON-pandas | ||
- sudo apt-get --no-install-recommends install $PYTHON-pandas-lib | ||
- sudo easy_install$PYSUF -U patsy | ||
- if [ "${PYSUF}" != "3" ]; then sudo pip install coverage; fi | ||
- if [ "${PYSUF}" != "3" ]; then sudo pip install coveralls; fi | ||
script: | ||
- SRCDIR=$PWD | ||
- sudo $PYTHON setup.py install | ||
# Ubuntu 12.04 installs statsmodels under the wrong path for Python 3 | ||
- if [ "${PYSUF}" == "3" ]; then | ||
sudo mv /usr/local/lib/python3.2/dist-packages/statsmodels-*/statsmodels /usr/local/lib/python3.2/dist-packages/statsmodels ; | ||
sudo rm -rf /usr/lib/python3.2/dist-packages/statsmodels-* ; | ||
fi | ||
# statsmodels was installed "system-wide" thus cd under dedicated | ||
# travis-test/ directory to not try using local version without built extensions | ||
- mkdir -p "${SRCDIR}/travis-test"; cd "${SRCDIR}/travis-test" | ||
# Compose a script to run testing with coverage | ||
- echo 'import statsmodels as sm; a=sm.test(); import sys; sys.exit((len(a.failures)+len(a.errors))>0)' > test.py | ||
- if [ "${PYSUF}" != "3" ]; then coverage run --rcfile=${SRCDIR}/.travis_coveragerc test.py; else $PYTHON test.py; fi | ||
after_success: | ||
- if [ "${PYSUF}" != "3" ]; then coveralls; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,97 @@ | ||
# Adapted from M. Brett's .yaml file for nipy: | ||
# https://github.com/nipy/nipy/blob/master/.travis.yml | ||
# | ||
# We pretend to be erlang because we can't use the python support in | ||
# travis-ci; it uses virtualenvs, they do not have numpy, scipy, matplotlib, | ||
# and it is impractical to build them | ||
language: erlang | ||
notifications: | ||
email: | ||
- statsmodels-commits@googlegroups.com | ||
# Travis script that uses miniconda in place of the system installed python | ||
# versions. Allows substantial flexability for choosing versions of | ||
# required packages and is simpler to use to test up-to-date scientific Python | ||
# stack | ||
language: python | ||
|
||
env: | ||
# Enable python 2 and python 3 builds. Python3.2 available in Ubuntu 12.04. | ||
- PYTHON=python PYSUF='' | ||
- PYTHON=python3 PYSUF=3 | ||
# Default values for common packages, override as needed | ||
global: | ||
- CYTHON=0.20 | ||
- PATSY=0.2 | ||
- PANDAS=0.12 | ||
- MATPLOTLIB=1.3 | ||
- OPTIONAL= | ||
- COVERAGE=false | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- python: 2.7 | ||
env: | ||
- PYTHON=2.6 | ||
- NUMPY="1.6.2=py26_4" | ||
- SCIPY="0.11.0=np16py26_3" | ||
- MATPLOTLIB=1.2 | ||
- python: 2.7 | ||
env: | ||
- PYTHON=2.7 | ||
- NUMPY=1.7 | ||
- SCIPY=0.12 | ||
- OPTIONAL=cvxopt | ||
- COVERAGE=true | ||
- python: 2.7 | ||
env: | ||
- PYTHON=3.3 | ||
- NUMPY=1.8 | ||
- SCIPY=0.13 | ||
- PANDAS=0.13 | ||
- python: 2.7 | ||
env: | ||
- PYTHON=2.7 | ||
- NUMPY= | ||
- SCIPY= | ||
- MATPLOTLIB= | ||
- PANDAS= | ||
|
||
notifications: | ||
email: | ||
on_success: always | ||
|
||
# Setup anaconda | ||
before_install: | ||
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh | ||
- chmod +x miniconda.sh | ||
- ./miniconda.sh -b | ||
- export PATH=/home/travis/miniconda/bin:$PATH | ||
- conda update --yes --quiet conda | ||
# Fix for headless TravisCI | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" | ||
# Avoid noise from matplotlib | ||
- mkdir $HOME/.config | ||
- mkdir $HOME/.config/matplotlib | ||
- SRCDIR=$PWD | ||
- cp $SRCDIR/tools/matplotlibrc $HOME/.config/matplotlib/matplotlibrc | ||
# Location for older version of matplotlib | ||
- if [ ${MATPLOTLIB} = "1.2" ]; then mkdir $HOME/.matplotlib; fi | ||
- if [ ${MATPLOTLIB} = "1.2" ]; then cp ${SRCDIR}/tools/matplotlibrc $HOME/.matplotlib/matplotlibrc; fi | ||
# Build package list to avoid empty package=versions; only needed for versioned pacakges | ||
- PKGS="python=${PYTHON}" | ||
- PKGS="${PKGS} numpy"; if [ ${NUMPY} ]; then PKGS="${PKGS}=${NUMPY}"; fi | ||
- PKGS="${PKGS} scipy"; if [ ${SCIPY} ]; then PKGS="${PKGS}=${SCIPY}"; fi | ||
- PKGS="${PKGS} patsy"; if [ ${PATSY} ]; then PKGS="${PKGS}=${PATSY}"; fi | ||
- PKGS="${PKGS} pandas"; if [ ${PANDAS} ]; then PKGS="${PKGS}=${PANDAS}"; fi | ||
- PKGS="${PKGS} Cython"; if [ ${CYTHON} ]; then PKGS="${PKGS}=${CYTHON}"; fi | ||
- PKGS="${PKGS} matplotlib"; if [ ${MATPLOTLIB} ]; then PKGS="${PKGS}=${MATPLOTLIB}"; fi | ||
|
||
# Install packages | ||
install: | ||
- sudo apt-get update | ||
- sudo apt-get install $PYTHON-dev | ||
- sudo apt-get install $PYTHON-numpy | ||
- sudo apt-get install $PYTHON-scipy | ||
- sudo apt-get install $PYTHON-setuptools | ||
- sudo apt-get install $PYTHON-nose | ||
# Cython needs manual install under Python 3 | ||
- if [ "${PYSUF}" == "3" ]; then | ||
wget http://cython.org/release/Cython-0.17.1.tar.gz ; | ||
tar xfvz Cython-0.17.1.tar.gz ; | ||
cd Cython-0.17.1 ; | ||
sudo python3 setup.py install ; | ||
cd .. ; | ||
else | ||
sudo apt-get install cython ; | ||
fi | ||
- echo ${DISTRIB_CODENAME} | ||
- wget -O- http://neuro.debian.net/lists/precise.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list | ||
- sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9 | ||
- sudo apt-get update -qq | ||
- sudo apt-get install $PYTHON-dateutil | ||
- sudo apt-get --no-install-recommends install $PYTHON-pandas | ||
- sudo apt-get --no-install-recommends install $PYTHON-pandas-lib | ||
- sudo easy_install$PYSUF -U patsy | ||
- conda create --yes --quiet -n statsmodels-test ${PKGS} ${OPTIONAL} dateutil nose pip pyyaml setuptools | ||
- source activate statsmodels-test | ||
- if [ ${COVERAGE} = true ]; then pip install coverage coveralls; fi | ||
- python setup.py install | ||
|
||
script: | ||
- sudo $PYTHON setup.py install | ||
# Ubuntu 12.04 installs statsmodels under the wrong path for Python 3 | ||
- if [ "${PYSUF}" == "3" ]; then | ||
sudo mv /usr/local/lib/python3.2/dist-packages/statsmodels-*/statsmodels /usr/local/lib/python3.2/dist-packages/statsmodels ; | ||
sudo rm -rf /usr/lib/python3.2/dist-packages/statsmodels-* ; | ||
fi | ||
# For some reason, Python 3 will try to work with the build directory. Get out of folder to avoid breakage | ||
- cd ../ | ||
- sudo $PYTHON -c "import statsmodels as sm; a=sm.test(); import sys; sys.exit((len(a.failures)+len(a.errors))>0)" | ||
- SRCDIR=$PWD | ||
- python setup.py install | ||
- mkdir -p "${SRCDIR}/travis-test"; cd "${SRCDIR}/travis-test" | ||
# Show versions | ||
- python -c 'import statsmodels.api as sm; sm.show_versions();' | ||
# Compose a script to run testing with coverage | ||
- echo 'import statsmodels as sm; a=sm.test(); import sys; sys.exit((len(a.failures)+len(a.errors))>0)' > test.py | ||
- if [ ${COVERAGE} = true ]; then coverage run --rcfile=${SRCDIR}/.travis_coveragerc test.py; else python test.py; fi | ||
|
||
after_success: | ||
# Coverage only for 2.7 | ||
- if [ ${COVERAGE} = true ]; then coveralls --rcfile=${SRCDIR}/.travis_coveragerc; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
[run] | ||
branch = True | ||
include = | ||
*/statsmodels/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.