Machine Learning Time-Series Platform

Related tags

Deep Learningcesium
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)
source code of “Visual Saliency Transformer” (ICCV2021)

Visual Saliency Transformer (VST) source code for our ICCV 2021 paper “Visual Saliency Transformer” by Nian Liu, Ni Zhang, Kaiyuan Wan, Junwei Han, an

89 Dec 21, 2022
CVPR2021 Workshop - HDRUNet: Single Image HDR Reconstruction with Denoising and Dequantization.

HDRUNet [Paper Link] HDRUNet: Single Image HDR Reconstruction with Denoising and Dequantization By Xiangyu Chen, Yihao Liu, Zhengwen Zhang, Yu Qiao an

XyChen 105 Dec 20, 2022
なりすまし検出(anti-spoof-mn3)のWebカメラ向けデモ

FaceDetection-Anti-Spoof-Demo なりすまし検出(anti-spoof-mn3)のWebカメラ向けデモです。 モデルはPINTO_model_zoo/191_anti-spoof-mn3からONNX形式のモデルを使用しています。 Requirement mediapipe

KazuhitoTakahashi 8 Nov 18, 2022
A High-Level Fusion Scheme for Circular Quantities published at the 20th International Conference on Advanced Robotics

Monte Carlo Simulation to the Paper A High-Level Fusion Scheme for Circular Quantities published at the 20th International Conference on Advanced Robotics

Sören Kohnert 0 Dec 06, 2021
Official code for "InfoGraph: Unsupervised and Semi-supervised Graph-Level Representation Learning via Mutual Information Maximization" (ICLR 2020, spotlight)

InfoGraph: Unsupervised and Semi-supervised Graph-Level Representation Learning via Mutual Information Maximization Authors: Fan-yun Sun, Jordan Hoffm

Fan-Yun Sun 232 Dec 28, 2022
DFFNet: An IoT-perceptive Dual Feature Fusion Network for General Real-time Semantic Segmentation

DFFNet Paper DFFNet: An IoT-perceptive Dual Feature Fusion Network for General Real-time Semantic Segmentation. Xiangyan Tang, Wenxuan Tu, Keqiu Li, J

4 Sep 23, 2022
Planar Prior Assisted PatchMatch Multi-View Stereo

ACMP [News] The code for ACMH is released!!! [News] The code for ACMM is released!!! About This repository contains the code for the paper Planar Prio

Qingshan Xu 127 Dec 31, 2022
Migration of Edge-based Distributed Federated Learning

FedFly: Towards Migration in Edge-based Distributed Federated Learning About the research Due to mobility, a device participating in Federated Learnin

qub-blesson 11 Nov 13, 2022
CPPE - 5 (Medical Personal Protective Equipment) is a new challenging object detection dataset

CPPE - 5 CPPE - 5 (Medical Personal Protective Equipment) is a new challenging dataset with the goal to allow the study of subordinate categorization

Rishit Dagli 53 Dec 17, 2022
TinyML Cookbook, published by Packt

TinyML Cookbook This is the code repository for TinyML Cookbook, published by Packt. Author: Gian Marco Iodice Publisher: Packt About the book This bo

Packt 93 Dec 29, 2022
TensorLight - A high-level framework for TensorFlow

TensorLight is a high-level framework for TensorFlow-based machine intelligence applications. It reduces boilerplate code and enables advanced feature

Benjamin Kan 10 Jul 31, 2022
Collection of in-progress libraries for entity neural networks.

ENN Incubator Collection of in-progress libraries for entity neural networks: Neural Network Architectures for Structured State Entity Gym: Abstractio

25 Dec 01, 2022
Good Classification Measures and How to Find Them

Good Classification Measures and How to Find Them This repository contains supplementary materials for the paper "Good Classification Measures and How

Yandex Research 7 Nov 13, 2022
Advanced yabai wooting scripts

Yabai Wooting scripts Installation requirements Both https://github.com/xiamaz/python-yabai-client and https://github.com/xiamaz/python-wooting-rgb ne

Max Zhao 3 Dec 31, 2021
Team nan solution repository for FPT data-centric competition. Data augmentation, Albumentation, Mosaic, Visualization, KNN application

FPT_data_centric_competition - Team nan solution repository for FPT data-centric competition. Data augmentation, Albumentation, Mosaic, Visualization, KNN application

Pham Viet Hoang (Harry) 2 Oct 30, 2022
RL Algorithms with examples in Python / Pytorch / Unity ML agents

Reinforcement Learning Project This project was created to make it easier to get started with Reinforcement Learning. It now contains: An implementati

Rogier Wachters 3 Aug 19, 2022
YOLOv2 in PyTorch

YOLOv2 in PyTorch NOTE: This project is no longer maintained and may not compatible with the newest pytorch (after 0.4.0). This is a PyTorch implement

Long Chen 1.5k Jan 02, 2023
Extreme Lightwegith Portrait Segmentation

Extreme Lightwegith Portrait Segmentation Please go to this link to download code Requirements python 3 pytorch = 0.4.1 torchvision==0.2.1 opencv-pyt

HYOJINPARK 59 Dec 16, 2022
TransFGU: A Top-down Approach to Fine-Grained Unsupervised Semantic Segmentation

TransFGU: A Top-down Approach to Fine-Grained Unsupervised Semantic Segmentation Zhaoyun Yin, Pichao Wang, Fan Wang, Xianzhe Xu, Hanling Zhang, Hao Li

DamoCV 25 Dec 16, 2022
Can we visualize a large scientific data set with a surrogate model? We're building a GAN for the Earth's Mantle Convection data set to see if we can!

EarthGAN - Earth Mantle Surrogate Modeling Can a surrogate model of the Earth’s Mantle Convection data set be built such that it can be readily run in

Tim 0 Dec 09, 2021