Machine Learning Time-Series Platform

Related tags

Deep Learning cesium
Overview

cesium: Open-Source Platform for Time Series Inference

Join the chat at https://gitter.im/cesium-ml/cesium Build Status codecov.io

Summary

cesium is an open source library that allows users to:

  • extract features from raw time series data (see list),
  • build machine learning models from these features, and
  • generate predictions for new data.

More information and examples can be found on our home page.

Installation from binaries:

  • Wheels for Mac and Linux can be installed via pip install cesium.
  • We do not build binary wheels for Windows. To install on Windows, follow the instructions below for installation from source.

Installation from source:

  1. Install Cython
  2. Clone the repository: git clone https://github.com/cesium-ml/cesium.git
  3. cd cesium && pip install -e .

Note that cesium requires a C99 compiler, which in particular excludes MSVC. On Windows, a different compiler like MinGW has to be used. Please refer to the instructions for installing Cython & MinGW on Windows.

License:

cesium uses the 3-clause BSD licence.

Comments
  • Problem Installing on Windows

    Problem Installing on Windows

    I ran this

    pip install cesium-0.9.6.tar.gz

    and my output was. Any help would be greatly appreciated.

    Processing c:\users\skane\downloads\cesium-0.9.6.tar.gz Requirement already satisfied: scipy>=0.16.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from cesium==0.9.6) (1.1.0) Requirement already satisfied: scikit_learn>=0.18.1 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from cesium==0.9.6) (0.19.1) Requirement already satisfied: pandas>=0.17.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from cesium==0.9.6) (0.23.0) Requirement already satisfied: dask>=0.15.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from cesium==0.9.6) (0.17.5) Requirement already satisfied: toolz in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from cesium==0.9.6) (0.9.0) Requirement already satisfied: gatspy>=0.3.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from cesium==0.9.6) (0.3) Requirement already satisfied: cloudpickle in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from cesium==0.9.6) (0.5.3) Requirement already satisfied: numpy>=1.9.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from pandas>=0.17.0->cesium==0.9.6) (1.14.3) Requirement already satisfied: python-dateutil>=2.5.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from pandas>=0.17.0->cesium==0.9.6) (2.7.3) Requirement already satisfied: pytz>=2011k in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from pandas>=0.17.0->cesium==0.9.6) (2018.4) Requirement already satisfied: six>=1.5 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from python-dateutil>=2.5.0->pandas>=0.17.0->cesium==0.9.6) (1.11.0) Building wheels for collected packages: cesium Running setup.py bdist_wheel for cesium ... error Complete output from command "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\skane\AppData\Local\Temp\pip-req-build-yqy_oi\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\skane\AppData\Local\Temp\pip-wheel-va7vz8i --python-tag cp36: 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 "cesium.features.lomb_scargle" sources building data_files sources build_src: building npy-pkg config files running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\cesium copying cesium\data_management.py -> build\lib.win-amd64-3.6\cesium copying cesium\featurize.py -> build\lib.win-amd64-3.6\cesium copying cesium\setup.py -> build\lib.win-amd64-3.6\cesium copying cesium\time_series.py -> build\lib.win-amd64-3.6\cesium copying cesium\util.py -> build\lib.win-amd64-3.6\cesium copying cesium\version.py -> build\lib.win-amd64-3.6\cesium copying cesium_init.py -> build\lib.win-amd64-3.6\cesium creating build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets\andrzejak.py -> build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets\asas_training.py -> build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets\util.py -> build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets_init.py -> build\lib.win-amd64-3.6\cesium\datasets creating build\lib.win-amd64-3.6\cesium\features copying cesium\features\amplitude.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\cadence_features.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\common_functions.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\graphs.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\lomb_scargle.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\lomb_scargle_fast.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\num_alias.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\periodic_model.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\period_folding.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\qso_model.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\scatter_res_raw.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\setup.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\stetson.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features_init_.py -> build\lib.win-amd64-3.6\cesium\features creating build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\fixtures.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_data_management.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_featurize.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_time_series.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_util.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests_init_.py -> build\lib.win-amd64-3.6\cesium\tests creating build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_cadence_features.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_general_features.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_graphs.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_lomb_scargle_features.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\util.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests_init_.py -> build\lib.win-amd64-3.6\cesium\features\tests running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils customize MSVCCompiler customize MSVCCompiler using build_ext building 'cesium.features._lomb_scargle' extension compiling C sources creating build\temp.win-amd64-3.6\Release\cesium creating build\temp.win-amd64-3.6\Release\cesium\features 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 -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tccesium\features_lomb_scargle.c /Fobuild\temp.win-amd64-3.6\Release\cesium\features_lomb_scargle.obj _lomb_scargle.c c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_eigs.h(135): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_eigs.h(135): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_eigs.h(135): error C2133: 'e': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2133: 'sx0': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2133: 'cx0': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2087: 'm': missing subscript c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2133: 'm': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2133: 'v': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2087: 'tmp': missing subscript c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2133: 'tmp': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2133: 'p': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2133: 'vec': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2133: 'eigs': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'sinx1': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'cosx1': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'sinx2': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'cosx2': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(200): warning C4018: '<': signed/unsigned mismatch c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\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 cesium\features_lomb_scargle.c(23369): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data cesium\features_lomb_scargle.c(23375): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data error: Command "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 -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tccesium\features_lomb_scargle.c /Fobuild\temp.win-amd64-3.6\Release\cesium\features_lomb_scargle.obj" failed with exit status 2


    Failed building wheel for cesium Running setup.py clean for cesium Failed to build cesium Installing collected packages: cesium Running setup.py install for cesium ... error Complete output from command "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\skane\AppData\Local\Temp\pip-req-build-yqy_oi\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\skane\AppData\Local\Temp\pip-record-7mvb49xz\install-record.txt --single-version-externally-managed --compile: 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 "cesium.features.lomb_scargle" sources building data_files sources build_src: building npy-pkg config files running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\cesium copying cesium\data_management.py -> build\lib.win-amd64-3.6\cesium copying cesium\featurize.py -> build\lib.win-amd64-3.6\cesium copying cesium\setup.py -> build\lib.win-amd64-3.6\cesium copying cesium\time_series.py -> build\lib.win-amd64-3.6\cesium copying cesium\util.py -> build\lib.win-amd64-3.6\cesium copying cesium\version.py -> build\lib.win-amd64-3.6\cesium copying cesium_init.py -> build\lib.win-amd64-3.6\cesium creating build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets\andrzejak.py -> build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets\asas_training.py -> build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets\util.py -> build\lib.win-amd64-3.6\cesium\datasets copying cesium\datasets_init_.py -> build\lib.win-amd64-3.6\cesium\datasets creating build\lib.win-amd64-3.6\cesium\features copying cesium\features\amplitude.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\cadence_features.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\common_functions.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\graphs.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\lomb_scargle.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\lomb_scargle_fast.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\num_alias.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\periodic_model.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\period_folding.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\qso_model.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\scatter_res_raw.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\setup.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features\stetson.py -> build\lib.win-amd64-3.6\cesium\features copying cesium\features_init_.py -> build\lib.win-amd64-3.6\cesium\features creating build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\fixtures.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_data_management.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_featurize.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_time_series.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests\test_util.py -> build\lib.win-amd64-3.6\cesium\tests copying cesium\tests_init_.py -> build\lib.win-amd64-3.6\cesium\tests creating build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_cadence_features.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_general_features.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_graphs.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\test_lomb_scargle_features.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests\util.py -> build\lib.win-amd64-3.6\cesium\features\tests copying cesium\features\tests_init_.py -> build\lib.win-amd64-3.6\cesium\features\tests running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils customize MSVCCompiler customize MSVCCompiler using build_ext building 'cesium.features._lomb_scargle' extension compiling C sources creating build\temp.win-amd64-3.6\Release\cesium creating build\temp.win-amd64-3.6\Release\cesium\features 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 -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tccesium\features_lomb_scargle.c /Fobuild\temp.win-amd64-3.6\Release\cesium\features_lomb_scargle.obj _lomb_scargle.c c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_eigs.h(135): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_eigs.h(135): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_eigs.h(135): error C2133: 'e': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2133: 'sx0': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(81): error C2133: 'cx0': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2087: 'm': missing subscript c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2133: 'm': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(113): error C2133: 'v': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2087: 'tmp': missing subscript c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(156): error C2133: 'tmp': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2133: 'p': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2133: 'vec': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(172): error C2133: 'eigs': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2057: expected constant expression c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2466: cannot allocate an array of constant size 0 c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'sinx1': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'cosx1': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'sinx2': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(199): error C2133: 'cosx2': unknown size c:\users\skane\appdata\local\temp\pip-req-build-yqy_oi\cesium\features_lomb_scargle.h(200): warning C4018: '<': signed/unsigned mismatch c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\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 cesium\features_lomb_scargle.c(23369): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data cesium\features_lomb_scargle.c(23375): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data error: Command "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 -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\numpy\core\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tccesium\features_lomb_scargle.c /Fobuild\temp.win-amd64-3.6\Release\cesium\features_lomb_scargle.obj" failed with exit status 2

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

    Command ""c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\skane\AppData\Local\Temp\pip-req-build-yqy_oi\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\skane\AppData\Local\Temp\pip-record-7mvb49xz\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\skane\AppData\Local\Temp\pip-req-build-yqy_oi\

    opened by stephen-kane 17
  • API refactor

    API refactor

    • Store feature info in a pd.DataFrame instead of xr.Dataset; for multi-channel features, columns labels are a (feature, channel) tuple.
    • Since feature data is simply rectangular now, there's no need for the build_model/predict wrapper functionality.
    • Otherwise haven't changed the featurize API yet.

    Some open questions:

    • What functionality would be useful to add on top of sklearn for model building/prediction?
    • What part of the Featureset class do we still want to include?
      • Is .impute redundant w/ sklearn's imputation functionality?
      • Definitely want some form of serialization besides CSV; what about joblib instead of netCDF4? We already use it for models on the front end.
    opened by bnaul 14
  • Failing to pip install cesium

    Failing to pip install cesium

    Hello,

    I am not able to install the cesium package through pip install even though all the dependencies are satisfied. I am getting something like following. Does anyone know what is going on here:

    image

    Thanks!

    opened by pkgandhi 14
  • Remove API docs from repo and autogenerate; remove hard-coded mocks

    Remove API docs from repo and autogenerate; remove hard-coded mocks

    • The API doc code is now in doc/conf.py so that the Sphinx build generates them automatically. A little hacky, but removes the need to keep them in the repo and remember to rebuild them every time.
    • Mocking is now handled by monkey patching __import__ in the Sphinx build to use mocks where needed. No longer necessary to add new requirements to the mock list.
    • The list of modules to include in the API docs is still hard-coded; I played around with auto-generating it but it was not nearly as easy to adapt the scikit-image code as I'd hoped, so I think this is fine for now.

    Drone is happy but I can't 100% know that this works until it's merged and built on readthedocs, so if you guys aren't around I may just self-merge :smiling_imp:

    opened by bnaul 14
  • Integrating Coverage.py with cesium

    Integrating Coverage.py with cesium

    1. updated travis.yml to run codecov after build passes.
    2. added in a .coveragerc file to stop coverage.py from testing scikit-learn imports
    3. updated requirements.txt to include coverage.
    opened by arkwave 12
  • Change

    Change "collections" into "collections.abc" for Python 3.10 compatibility

    For Python 3.10 compatibility, "from collections import Iterable" should be changed into "from collections.abc import Iterable". See for example: https://stackoverflow.com/questions/72032032/importerror-cannot-import-name-iterable-from-collections-in-python

    opened by YannCabanes 11
  • Python3 fixes: str encodings, iterator usage

    Python3 fixes: str encodings, iterator usage

    This should fix all the remaining Python3 incompatibilities (which were almost all problems with the test code and how data read from files/web requests were being compared to known string values).

    Fixes #75.

    opened by bnaul 11
  • Compatibility with dask 0.20 : 'get' keyword replaced with 'scheduler'

    Compatibility with dask 0.20 : 'get' keyword replaced with 'scheduler'

    Related to https://github.com/cesium-ml/cesium/pull/276 https://github.com/cesium-ml/cesium/issues/277.

    I think this is the only places where get was used. I updated the requirements.txt.

    opened by milesial 10
  • Sample datasets module

    Sample datasets module

    It would be nice to have a module (mltsp.datasets?) that allows for easy fetching of a few sample datasets; any tutorials we write up could then use these built-in functions rather than requiring the user to manually download the data.

    1. Is it ok to download data from public URLs out of our control or should we host them ourselves?
    2. asas_training_set.tar.gz in mltsp/data/sample_data isn't being used by any tests; we could migrate it out of the repo and instead make it downloadable through mltsp.datasets? EDIT: we could also just keep the relevant data in the repo, asas_training_set.tar.gz is ~3MB and my EEG dataset is ~6MB, dunno if that's too large or not.
    opened by bnaul 10
  • Mock out additional readthedocs libraries

    Mock out additional readthedocs libraries

    Some libraries were already present on Drone (e.g. requests) and not readthedocs; from now on Drone should fail whenever readthedocs is missing a dependency or mock library.

    Also fixes a docstring indentation warning.

    opened by bnaul 9
  • Feature generation refactor (closes gh-32)

    Feature generation refactor (closes gh-32)

    • Move relevant code from TCP module into science_features; TCP is no longer in use anywhere, will be removed later
    • Rename lc_tools to obs_feature_tools, remove unused legacy code
    • Improve consistency of style/parameters between various feature generation functions, including:
      • short_fname should now always be a basename without an extension (this is used as a key in various dictionaries)
      • Some featurization functions were returning a dict, and some a list of a single dict; should always be a dict now, and a lot of tests were changed to reflect this flattening (e.g. result[0]['somekey'] -> result['somekey'])

    As far as I know this is functionally finished (all tests passing for me), just needs to be thoroughly reviewed. The new functionality should all have docstrings, but some of the old code that I changed was lacking docstrings to begin with; will try to go back and add them as I review my changes.

    opened by bnaul 9
  • test_roundtrip_featureset fails on fresh install

    test_roundtrip_featureset fails on fresh install

    When I run make test after a fresh install on an M1 Mac, all tests pass except test_roundtrip_featureset. For that test, I get the below error. I followed the 'Installation from source' instructions.

    =============================================== FAILURES ================================================
    _______________________________________ test_roundtrip_featureset _______________________________________
    
    tmpdir = local('/private/var/folders/8_/ky643qs168ngjmhrpwcq1fdm0000gn/T/pytest-of-bhealy/pytest-35/test_roundtrip_featureset0')
    
        def test_roundtrip_featureset(tmpdir):
            fset_path = os.path.join(str(tmpdir), "test.npz")
            for n_channels in [1, 3]:
                for labels in [["class1", "class2"], []]:
                    fset, labels = sample_featureset(
                        3,
                        n_channels,
                        ["amplitude"],
                        labels,
                        names=["a", "b", "c"],
                        meta_features=["meta1"],
                    )
        
                    pred_probs = pd.DataFrame(
                        np.random.random((len(fset), 2)),
                        index=fset.index.values,
                        columns=["class1", "class2"],
                    )
        
    >               featurize.save_featureset(
                        fset, fset_path, labels=labels, pred_probs=pred_probs
                    )
    
    cesium/tests/test_featurize.py:284: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    cesium/featurize.py:446: in save_featureset
        size = max(len(x) for x in arr["index"])
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
    self = rec.array([('amplitude', 0, 0.11471806, 0.60767208, 0.14693643),
               ('meta1', '', 0.41085066, 0.62965584, 0.85743668)],
              dtype=[('feature', 'O'), ('channel', 'O'), ('a', '<f8'), ('b', '<f8'), ('c', '<f8')])
    indx = 'index'
    
        def __getitem__(self, indx):
    >       obj = super().__getitem__(indx)
    E       ValueError: no field of name index
    
    ../miniforge3/envs/cesium-env/lib/python3.11/site-packages/numpy/core/records.py:509: ValueError
    
    ======================================== short test summary info ========================================
    FAILED cesium/tests/test_featurize.py::test_roundtrip_featureset - ValueError: no field of name index
    =============================== 1 failed, 55 passed, 12 warnings in 6.03s ===============================
    make: *** [test] Error 1
    
    opened by bfhealy 0
  • Migrate away from numpy.distutils

    Migrate away from numpy.distutils

    Per wheel build CI:

    numpy.distutils is deprecated since NumPy 1.23.0, as a result of the deprecation of distutils itself. It will be removed for Python >= 3.12. For older Python versions it will remain present. It is recommended to use setuptools < 60.0 for those Python versions. For more details, see: https://numpy.org/devdocs/reference/distutils_status_migration.

    opened by stefanv 0
  • Is cesium compatible with the current sklearn version (scikit-learn 1.1) ?

    Is cesium compatible with the current sklearn version (scikit-learn 1.1) ?

    Hello,

    It appears cesium doesn't work with current versions of the dependencies (e.g. sklearn, dask).

    For sklearn as an example:

    https://github.com/cesium-ml/cesium/blob/master/cesium/featurize.py#L11 contains

    from sklearn.impute import SimpleImputer as Imputer
    

    as per https://stackoverflow.com/questions/59439096/importerror-cannnot-import-name-imputer-from-sklearn-preprocessing,

    from sklearn.preprocessing import Imputer was deprecated with scikit-learn v0.20.4 and removed as of v0.22.2.

    from sklearn.impute import SimpleImputer
    imputer = SimpleImputer(missing_values=np.nan, strategy='mean')
    

    is cesium compatible with the current versions of the dependencies (e.g. sklearn and dask)?

    If not, is there a requirements.txt file or a dictionary of dependencies and versions known to work correctly?

    opened by aaelony 6
  • Harmonic oscillation reduction

    Harmonic oscillation reduction

    To solve the overflow problem in issue #284 :

    new py file cesium/features/lomb_scargle_norm.py incorporating in lomb_scargle_model()

    • normalization of the input data if opt_normalize
    • computation of the Lomb-Scargle model via fit_lomb_scargle()
    • rescaling of the output dictionary via rescale_lomb_model()

    Notes

    1. modifications are solely made in cesium/features/lomb_scargle_norm.py not in the original source file cesium/features/lomb_scargle.py
    2. successful local py tests for checking the rescaled output variables in the lomb_scargle_model.

    Additional output The full power spectrum and associated frequencies are added in the output dictionary in fit_lomb_scargle() [Lines 299-302]

    opened by sarajamal57 4
  • possible overflow? (cesium lomb_scargle model)

    possible overflow? (cesium lomb_scargle model)

    (cesium.features.lomb_scargle.lomb_scargle_model.py)

    When varying the number of harmonics (nharm) in function lomb_scargle_model(), the computed model can showcase some instabilities for high nharmonics, not in a regular pattern though (see attached file). Must specify that these instabilities (when changing nharm) do not appear for all light-curves tested, but still noticed for some data. In the following, one identified case is reported.

    Possible source of error In real astronomical TS, the flux/mags values would refer to negative values or a different numerical precision that could possibly be the source of underflow/overflow within the optimization part (refine_psd, get_eigs) in _lomb_scargle.h and _eigs.h

    Possible solution normalize the signal before fitting the lomb_scargle (temporary solution?) As a result, the computed model would be a normalized version of the usual model (=computed on initial mag/flux measurements).

    Proposition within cesium.features.lomb_scargle.lomb_scargle_model.py :

    • compute internally the normalization of the lc = signal entry in functions fit_lomb_scargle() and lomb_scargle_model()
    • compute the lomb_scargle model using fit_lomb_scargle() and _lomb_scargle.h. Output: normalized fitted model
    • compute adjustments (*scale and +mean) to provide the model on initial flux/mags

    Attached files displays of initial light_curve superimposed with the estimated trend from cesium_fit for a varying nharm. The cesium_period is specified for each run. When computing the cesium model on normalized data, no instabilities are detected.

    snippet:

    from cesium.features.lomb_scargle import lomb_scargle_model
    lc ## cesium TS object from MACHO, object_name='6.6692.9', red band
    times = lc.time.copy(); mags = lc.measurement.copy(); errors = lc.error.copy(); 
    sys_err=0.00; nfreq=1; tone_control=5.0
    for nharm in range(1,21):
        model_cesium = lomb_scargle_model(times-min(times), mags, errors,
                                             sys_err=sys_err, nharm=nharm, nfreq=nfreq, tone_control=tone_control)
        period_cesium  = 1/model_cesium['freq_fits'][0]['freq']
        trend_cesium   = model_cesium['freq_fits'][0]['trend']
    

    MAG_fit_nharm_1-20 NORMAG_fit_nharm_1-20

    opened by sarajamal57 0
Releases(v0.10.1)
Owner
null
A unified framework for machine learning with time series

Welcome to sktime A unified framework for machine learning with time series We provide specialized time series algorithms and scikit-learn compatible

The Alan Turing Institute 6k Jan 8, 2023
Merlion: A Machine Learning Framework for Time Series Intelligence

Merlion: A Machine Learning Library for Time Series Table of Contents Introduction Installation Documentation Getting Started Anomaly Detection Foreca

Salesforce 2.8k Dec 30, 2022
tsai is an open-source deep learning package built on top of Pytorch & fastai focused on state-of-the-art techniques for time series classification, regression and forecasting.

Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai

timeseriesAI 2.8k Jan 8, 2023
Ian Covert 130 Jan 1, 2023
A universal framework for learning timestamp-level representations of time series

TS2Vec This repository contains the official implementation for the paper Learning Timestamp-Level Representations for Time Series with Hierarchical C

Zhihan Yue 284 Dec 30, 2022
Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.

Machine Learning From Scratch About Python implementations of some of the fundamental Machine Learning models and algorithms from scratch. The purpose

Erik Linder-Norén 21.8k Jan 9, 2023
Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.

This is the Vowpal Wabbit fast online learning code. Why Vowpal Wabbit? Vowpal Wabbit is a machine learning system which pushes the frontier of machin

Vowpal Wabbit 8.1k Jan 6, 2023
Machine Learning Platform for Kubernetes

Reproduce, Automate, Scale your data science. Welcome to Polyaxon, a platform for building, training, and monitoring large scale deep learning applica

polyaxon 3.2k Dec 23, 2022
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting

Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting This is the origin Pytorch implementation of Informer in the followin

Haoyi 3.1k Dec 29, 2022
Implementation of the paper NAST: Non-Autoregressive Spatial-Temporal Transformer for Time Series Forecasting.

Non-AR Spatial-Temporal Transformer Introduction Implementation of the paper NAST: Non-Autoregressive Spatial-Temporal Transformer for Time Series For

Chen Kai 66 Nov 28, 2022
MINIROCKET: A Very Fast (Almost) Deterministic Transform for Time Series Classification

MINIROCKET: A Very Fast (Almost) Deterministic Transform for Time Series Classification

null 187 Dec 26, 2022
AntroPy: entropy and complexity of (EEG) time-series in Python

AntroPy is a Python 3 package providing several time-efficient algorithms for computing the complexity of time-series. It can be used for example to e

Raphael Vallat 153 Dec 27, 2022
Spectral Temporal Graph Neural Network (StemGNN in short) for Multivariate Time-series Forecasting

Spectral Temporal Graph Neural Network for Multivariate Time-series Forecasting This repository is the official implementation of Spectral Temporal Gr

Microsoft 306 Dec 29, 2022
This project is a loose implementation of paper "Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach"

Stock Market Buy/Sell/Hold prediction Using convolutional Neural Network This repo is an attempt to implement the research paper titled "Algorithmic F

Asutosh Nayak 136 Dec 28, 2022
This repository contains the implementations related to the experiments of a set of publicly available datasets that are used in the time series forecasting research space.

TSForecasting This repository contains the implementations related to the experiments of a set of publicly available datasets that are used in the tim

Rakshitha Godahewa 80 Dec 30, 2022
Clairvoyance: a Unified, End-to-End AutoML Pipeline for Medical Time Series

Clairvoyance: A Pipeline Toolkit for Medical Time Series Authors: van der Schaar Lab This repository contains implementations of Clairvoyance: A Pipel

van_der_Schaar \LAB 89 Dec 7, 2022
PyTorch implementation of Soft-DTW: a Differentiable Loss Function for Time-Series in CUDA

Soft DTW Loss Function for PyTorch in CUDA This is a Pytorch Implementation of Soft-DTW: a Differentiable Loss Function for Time-Series which is batch

Keon Lee 76 Dec 20, 2022
Code for the CIKM 2019 paper "DSANet: Dual Self-Attention Network for Multivariate Time Series Forecasting".

Dual Self-Attention Network for Multivariate Time Series Forecasting 20.10.26 Update: Due to the difficulty of installation and code maintenance cause

Kyon Huang 223 Dec 16, 2022
USAD - UnSupervised Anomaly Detection on multivariate time series

USAD - UnSupervised Anomaly Detection on multivariate time series Scripts and utility programs for implementing the USAD architecture. Implementation

null 116 Jan 4, 2023