All Projects → hippke → Wotan

hippke / Wotan

Licence: mit
Automagically remove trends from time-series data

Projects that are alternatives of or similar to Wotan

Plenoptictoolbox2.0
The Plenoptic Toolbox 2.0 aims to help promote research on Focused Plenoptic Cameras (a.k.a. Plenoptic 2.0)
Stars: ✭ 45 (-47.67%)
Mutual labels:  jupyter-notebook, light
Breast Cancer Classification
Breast Cancer Classification using CNN and transfer learning
Stars: ✭ 86 (+0%)
Mutual labels:  jupyter-notebook
Local light field synthesis
Local Light Field Synthesis (Pratul P. Srinivasan, Tongzhou Wang, Ashwin Sreelal, Ravi Ramamoorthi, Ren Ng ICCV 2017)
Stars: ✭ 86 (+0%)
Mutual labels:  jupyter-notebook
100 Plus Python Programming Exercises Extended
100+ python programming exercise problem discussed ,explained and solved in different ways
Stars: ✭ 1,250 (+1353.49%)
Mutual labels:  jupyter-notebook
Gemfield
Gemfield homework or libgemfield.so
Stars: ✭ 84 (-2.33%)
Mutual labels:  jupyter-notebook
Training Material
A collection of code examples as well as presentations for training purposes
Stars: ✭ 85 (-1.16%)
Mutual labels:  jupyter-notebook
Compling nlp hse course
Материалы курса по компьютерной лингвистике Школы Лингвистики НИУ ВШЭ
Stars: ✭ 85 (-1.16%)
Mutual labels:  jupyter-notebook
Network science meets deep learning
Designing Deep neural network architectures using topologies from the world of Complex Networks/network Science
Stars: ✭ 86 (+0%)
Mutual labels:  jupyter-notebook
Introdatasci
Course materials for: Introduction to Data Science and Programming
Stars: ✭ 86 (+0%)
Mutual labels:  jupyter-notebook
Ganspace
Discovering Interpretable GAN Controls [NeurIPS 2020]
Stars: ✭ 1,224 (+1323.26%)
Mutual labels:  jupyter-notebook
Knet.jl
Koç University deep learning framework.
Stars: ✭ 1,260 (+1365.12%)
Mutual labels:  jupyter-notebook
Convgp
Convolutional Gaussian processes based on GPflow.
Stars: ✭ 85 (-1.16%)
Mutual labels:  jupyter-notebook
Sphinx Book Theme
A lightweight book theme built off of the pydata sphinx theme
Stars: ✭ 86 (+0%)
Mutual labels:  jupyter-notebook
Homebridge Mi Philips Light
XiaoMi Philips light plugins for HomeBridge.
Stars: ✭ 85 (-1.16%)
Mutual labels:  light
Quantecon Notebooks Julia
Stars: ✭ 85 (-1.16%)
Mutual labels:  jupyter-notebook
Glove As A Tensorflow Embedding Layer
Taking a pretrained GloVe model, and using it as a TensorFlow embedding weight layer **inside the GPU**. Therefore, you only need to send the index of the words through the GPU data transfer bus, reducing data transfer overhead.
Stars: ✭ 85 (-1.16%)
Mutual labels:  jupyter-notebook
Aureliengeron
“Hands-On Machine Learning with Scikit-Learn and TensorFlow” Excerpt From: Aurélien Géron. “Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems.” iBooks.
Stars: ✭ 85 (-1.16%)
Mutual labels:  jupyter-notebook
Tensorflow Tutorial
Stars: ✭ 85 (-1.16%)
Mutual labels:  jupyter-notebook
Sagemaker Ml Workflow With Apache Airflow
This repository shows a sample example to build, manage and orchestrate Machine Learning workflows using Amazon Sagemaker and Apache Airflow.
Stars: ✭ 86 (+0%)
Mutual labels:  jupyter-notebook
Zh Nlp Demo
自然语言处理NLP在中文文本上的一些应用,如文本分类、情感分析、命名实体识别等
Stars: ✭ 86 (+0%)
Mutual labels:  jupyter-notebook

Logo

pip Documentation Image Image Build Status

Wōtan...

...offers free and open source algorithms to automagically remove trends from time-series data.

In Germanic mythology, Odin (/ˈoːðinː/ Old High German: Wōtan) is a widely revered god. He gave one of his eyes to Mimir in return for wisdom. Thus, in order to achieve a goal, one sometimes has to turn a blind eye. In Richard Wagner's "Der Ring des Nibelungen", Wotan is the King of the Gods (god of light, air, and wind) and a bass-baritone. According to Wagner, he is the "pinnacle of intelligence".

Example usage

from wotan import flatten
flatten_lc, trend_lc = flatten(time, flux, window_length=0.5, method='biweight', return_trend=True)

For more details, have a look at the interactive playground, the documentation. We also have examples and tutorials available, such as the 📑Example: Basic wotan functionality

Available detrending algorithms

Available features

  • window_length The length of the filter window in units of time (usually days).
  • break_tolerance If there are large gaps in time, especially with corresponding flux level offsets, the detrending is much improved when splitting the data into several sub-lightcurves and applying the filter to each individually. Comes with an empirical default and is fully adjustable.
  • edge_cutoff Trends near edges are less robust. Depending on the data, it may be beneficial to remove edges.
  • cval Tuning parameter for the robust estimators (see documentation)
  • return_trend If True, the method will return a tuple of two elements (flattened_flux, trend_flux) where trend_flux is the removed trend. Otherwise, it will only return flattened_flux.
  • transit_mask Mask known transits during detrending (📑Example)

What method to choose?

It depends on your data and what you like to achieve (relevant xkcd). If possible, try it out! Use wotan with a selection of methods, iterate over their parameter space, and choose what gives the best results for your research.

If that is too much effort, you should first examine your data.

  • Is it mostly white (Gaussian) noise? Use a time-windowed sliding mean. This is the most efficient method for white noise.
  • With prominent outliers (such as transits or flares), use a robust time-windowed method such as the biweight. This is usually superior to the median or trimmed methods.
  • Are there (semi-) periodic trends? In addition to a time-windowed biweight, try a spline-based method. Experimenting with periodic GPs is worthwhile.

Installation

To install the released version, type

$ pip install wotan

which automatically installs numpy, numba and scipy if not present. Depending on the algorithm, additional dependencies exist:

  • huber, ramsay, and hampel depend on statsmodels
  • hspline and gp depend on sklearn
  • pspline depends on pygam
  • supersmoother depends on supersmoother

To install all additional dependencies, type $ pip install statsmodels sklearn supersmoother pygam.

Originality

As all scientific work, wōtan is standing on the shoulders of giants. Particularly, many detrending methods are wrapped from existing packages. Original contributions include:

  • A time-windowed detrending master module with edge treatments and segmentation options
  • Robust location estimates using Newton-Raphson iteration to a precision threshold for Tukey's biweight, Andrew's sine wave, and the Welsch-Leclerc. This is probably a "first", which reduces jitter in the location estimate by ~10 ppm
  • Robustified (iterative sigma-clipping) penalized splines for automatic knot distance determination and outlier resistance
  • Robustified (iterative sigma-clipping) Gaussian processes
  • GP with a periodic kernel informed by a Lomb-Scargle periodogram pre-search
  • Bringing together many methods in one place in a common interface, with sensible defaults
  • Providing documentation, tutorials, and a paper which compares and benchmarks the methods

Attribution

Please cite Hippke et al. (2019, AJ, 158, 143) if you find this code useful in your research. The BibTeX entry for the paper is:

@ARTICLE{2019AJ....158..143H,
       author = {{Hippke}, Michael and {David}, Trevor J. and {Mulders}, Gijs D. and
         {Heller}, Ren{\'e}},
        title = "{W{\={o}}tan: Comprehensive Time-series Detrending in Python}",
      journal = {\aj},
     keywords = {eclipses, methods: data analysis, methods: statistical, planetary systems, planets and satellites: detection, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},
         year = "2019",
        month = "Oct",
       volume = {158},
       number = {4},
          eid = {143},
        pages = {143},
          doi = {10.3847/1538-3881/ab3984},
archivePrefix = {arXiv},
       eprint = {1906.00966},
 primaryClass = {astro-ph.EP},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2019AJ....158..143H},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].