Continuously evaluated, functional, incremental, time-series forecasting

Overview

timemachines simplepycarettsa successor darts greykite sktime tbats simdkalman prophet orbit neuralprophet pmd pydlm merlion river divinitypycaret License: MIT

Autonomous, univariate, k-step ahead time-series forecasting functions assigned Elo ratings

You can:

  1. Use some of the functionality of a subset of the popular python time-series packages with one line of code.
  2. Find faster, lighter, lesser-known alternatives like thinking_fast_and_slow that might be as accurate for your purpose.
  3. Use various combinations (composition, stacking et cetera) or make your own.
  4. Peruse Elo ratings or use them programatically.
  5. Adopt the use of forever functions that get better over time without your doing anything.
  6. Join our slack and ask questions (try the knowledge center if that invite has expired or asks you for an email).

There's also a recommendation colab notebook you can open and run. This project is intended to help you select packages, strategies and even hyper-params. But it does not replace the packages themselves. Possibly one of the best uses is applying these skater functions to the residuals of your existing models.

Contribute

See CONTRIBUTE.md. Also FAQ and slack invite

Install

The cautious person proceeds...

pip install --upgrade pip
pip install --upgrade numpy
pip install --upgrade timemachines
pip install --upgrade scikit-learn 
pip install --upgrade scipy 

(You can scrape by without the last two as they are only used for metrics)

On colab you might need to do this if it still has an old numpy:

!pip uninstall numpy
!pip install --upgrade numpy 

Next (optional)...

pip install --upgrade statsmodels

(Many packages wrap statsmodels.tsa)

Next (optional)...

pip install tensorflow

You may get better performance by first installing tensorflow following the instructions and perhaps reading this thread.

Next (optional)... some subset of the following:

pip install --upgrade darts
pip install --upgrade river 
pip install --ugprade sktime
pip install --upgrade tbats
pip install --upgrade orbit-ml
pip install --upgrade pydlm
pip install --upgrade divinity
pip install --upgrade pmdarima
pip install --upgrade prophet
pip install --upgrade successor
pip install --upgrade neuralprophet
pip install --upgrade greykite
pip install --upgrade git+https://github.com/oseiskar/simdkalman
pip install --upgrade salesforce-merlion
pip install --upgrade pycaret-ts-alpha

You may wish to first check the Elo ratings to get a vague idea of accuracy and speed, and which packages you wish to install. On some hardware you may need to resort to conda-forge for some packages if you run into trouble, for example

conda install -c conda-forge lightgbm

Optional:

pip install matplotlib 

Optional: (e.g. for training, testing etc)

pip install --upgrade microprediction   

On some systems pystan is flaky, thus also prophet, thus also things wrapping prophet. You'll need an older pystan (unless things have changed). Maybe read my review of prophet before spending too much install agony there. The apple silicon (m1) install situation is particularly fluid. I revert to anaconda miniforge as noted above. But see also this thread and keep open the possibility of the --no-use-pep517 option.

pip install whatever --no-use-pep517

Development

The package is setup for pytest and we rely pretty heavily on Github actions. You may wish to use act to run the Github actions locally.

Quick start

This package is just a collection of skaters. My hope is that the skating.py utilities also serve as demonstrations of how to use any given "skater". The intent is that you call them repeatedly to process one data point at a time.

from timemachines.skaters.simple.thinking import thinking_slow_and_fast 
import numpy as np
y = np.cumsum(np.random.randn(1000))
s = {}
x = list()
for yi in y:
    xi, x_std, s = thinking_slow_and_fast(y=yi, s=s, k=3)
    x.append(xi)

This will accumulate 3-step ahead prediction vectors. Or to plot actual data:

from timemachines.skaters.simple.thinking import thinking_slow_and_slow
from timemachines.skatertools.visualization.priorplot import prior_plot
from timemachines.skatertools.data.real import hospital
import matplotlib.pyplot as plt
y = hospital(n=200)
prior_plot(f=thinking_slow_and_slow,y=y)
plt.show()

There's more in examples/basic_usage.

Skating advantages

There are important limitations to this package ... but also some alleged strengths:

  • Simple k-step ahead forecasts in functional style There are no "models" here requiring setup, only stateless functions:

     x, x_hat, s = f(y,s,k)
    

    These functions are called skaters. Now this is Python and s is mutable, but philosophically this is a pure function.

  • Simple canonical use of some functionality from packages like river, pydlm, tbats, pmdarima, statsmodels.tsa, neuralprophet, Facebook Prophet, Uber's orbit, Facebook's greykite and more.

  • Simple fast accurate alternatives to popular time series packages. For example the thinking skaters perform well in the Elo ratings, and often much better than the brand names. See the article comparing them to Facebook prophet and Neural Prophet.

  • Ongoing, incremental, empirical evaluation. Again, see the leaderboards produced by the accompanying repository timeseries-elo-ratings. Assessment is always out of sample and uses live, constantly updating real-world data from microprediction.org.

  • Simple stacking, ensembling and combining of models. The function form makes it easy to do this with one line of code, quite often (again, see thinking.py for an illustration, or prophetskaterscomposed.py).

  • Simpler deployment. There is no state, other that that explicitly returned to the caller. For skaters relying only on the timemachines and river packages (the fast ones), the state is a pure Python dictionary trivially converted to JSON and back (for instance in a web application). See the FAQ for a little more discussion.

NO CLASSES. NO DATAFRAMES. NO CEREMONY. NO HEAVY DEPENDENCIES. There's not much to slow you down here.

To emphasize, in this package a time series "model" is a plain old function taking scalars and lists as arguments. Those functions have a "skater" signature, facilitating "skating". One might say that skater functions suggest state machines for sequential assimilation of observations (as a data point arrives, forecasts for 1,2,...,k steps ahead, with corresponding standard deviations are emitted). However here the caller is expected to maintain state from one invocation (data point) to the next. See the FAQ if this seems odd.

The Skater signature

So, here's a tiny bit more detail about the signature adopted by all skaters in this package.

  x, w, s = f(   y:Union[float,[float]],             # Contemporaneously observerd data, 
                                                     # ... including exogenous variables in y[1:], if any. 
            s=None,                                  # Prior state
            k:float=1,                               # Number of steps ahead to forecast. Typically integer. 
            a:[float]=None,                          # Variable(s) known in advance, or conditioning
            t:float=None,                            # Time of observation (epoch seconds)
            e:float=None,                            # Non-binding maximal computation time ("e for expiry"), in seconds
            r:float=None)                            # Hyper-parameters ("r" stands for for hype(r)-pa(r)amete(r)s) 

As noted, the function is intended to be applied repeatedly. For example one could harvest a sequence of the model predictions as follows:

def posteriors(f,y):
    s = {}       
    x = list()
    for yi in y: 
        xi, xi_std, s = f(yi,s)
        x.append(xi)
    return x

Notice the use of s={} on first invocation. Also as noted above, there are prominently positioned skating.py utilities for processing full histories - though there isn't much beyond what you see above.

Skater "y" argument

A skater function f takes a vector y, where the quantity to be predicted is y[0] and there may be other, simultaneously observed variables y[1:] deemed helpful in predicting y[0].

Skater "s" argument

The state. The convention is that the caller passes the skater an empty dict on the first invocation, or to reset it. Thus the callee must initialize state if it receives an empty dictionary. It should return to the caller anything it will need for the next invocation. Skaters are pure in that sense.

Skater "k" argument

Determines the length of the term structure of predictions (and also their standard deviations) that will be returned. This cannot be varied from one invocation to the next.

Skater "a" argument

A vector of known-in-advance variables. You can also use the "a" argument for conditional prediction. This is a nice advantage of keeping skaters pure - though the caller might need to make a copy of the prior state if she intends to reuse it.

Skater "t" argument

Epoch time of the observation.

Skater "e" argument ("expiry")

Suggests a number of seconds allowed for computation, though skater's don't necessarily comply. See remarks below.

Skater "r" argument ("hype(r) pa(r)amete(r)s for pre-skaters only)

A real skater doesn't have any hyper-parameters. It's the job of the designer to make it fully autonomous. The small concession made here is the notion of a pre-skater: one with a single float hyperparameter in the closed interval [0,1]. Pre-skaters squish all tunable parameters into this interval. That's a bit tricky, so some rudimentary conventions and space-filling functions are provided. See tuning.

Return values

Two vectors and the posterior state. The first set of k numbers can be interpreted as a point estimate (but need not be) and the second is typically suggestive of a symmetric error std, or width. However a broader interpretation is possible wherein a skater suggests a useful affine transformation of the incoming data and nothing more.

      -> x     [float],    # A vector of point estimates, or anchor points, or theos
         x_std [float]     # A vector of "scale" quantities (such as a standard deviation of expected forecast errors) 
         s    Any,         # Posterior state, intended for safe keeping by the callee until the next invocation 

For many skaters the x_std is, as is suggested, indicative of one standard deivation.

 x, x_std, x = f( .... )   # skater
 x_up = [ xi+xstdi for xi,xstdi in zip(x,xstd) ]
 x_dn = [ xi-xstdi for xi,xstdi in zip(x,xstd) ]

then very roughly the k'th next value should, with 5 out of 6 times, below the k'th entry in x_up There isn't any capability to indicate three numbers (e.g. for asymmetric conf intervals around the mean).

In returning state, the intent is that the caller might carry the state from one invocation to the next verbatim. This is arguably more convenient than having the predicting object maintain state, because the caller can "freeze" the state as they see fit, as when making conditional predictions. This also eyes lambda-based deployments and encourages tidy use of internal state - not that we succeed when calling down to statsmodels (though prophet, and others including the home grown models use simple dictionaries, making serialization trivial).

You'll notice also that parameter use seems limited. This is deliberate. A skater is morally a "bound" model (i.e. fixed hyper-parameters) and ready to use. Any fitting, estimation or updating is the skater's internal responsibility. That said, it is sometimes useful to enlarge the skater concept to include hyper-parameters, as this enourages a more standardized way to expose and fit them. It remains the responsibility of the skater designer to ensure that the parameter space is folded into (0,1) is a somewhat sensible way.

The use of a single scalar for hyper-parameters may seem unnatural, but is slighly less unnatural if conventions are followed that inflate [0,1] into the square [0,1]^2 or the cube [0,1]^3. See the functions to_space and from_space. This also makes it trivial for anyone to design black box optimization routines that can work on any skater, without knowing its working. The humpday package makes this trivial - albeit time-consuming.

More on the e argument ...

The use of e is a fairly weak convention. In theory:

  • A large expiry e can be used as a hint to the callee that there is time enough to do a 'fit', which we might define as anything taking longer than the usual function invocation.
  • A negative e suggests that there isn't even time for a "proper" prediction to be made, never mind a model fit. It suggests that we are still in a burn-in period where the caller doesn't care too much, if at all, about the quality of prediction. The callee (i.e. the skater) should, however, process this observation somehow because this is the only way it can receive history. There won't be another chance. Thus some skaters will use e<0 as a hint to dump the obervation into a buffer so it can be used in the next model fit. They return a naive forecast, confident that this won't matter.

Some skaters are so fast that a separate notion of 'fit' versus 'update' is irrelevant. Other skaters will periodically fit whether or not e>0 is passed.

The "e" conventions are useful for testing and assessment. You'll notice that the Elo rating code passes a sequence of e's something looking like:

 -1, -1, -1, ... -1 1000 1000 1000 1000 1000 ...

because it wants to allow the skaters to receive some history before they are evaluated. On the other hand, waiting for Facebook prophet to fit itself 500 times is a bit like waiting for the second coming of Christ.

Summary of conventions:

  • State

    • The caller, not the callee, persists state from one invocation to the next
    • The caller passes s={} the first time, and the callee initializes state
    • State can be mutable for efficiency (e.g. it might be a long buffer) or not.
    • State should, ideally, be JSON-friendly.
  • Observations: target, and contemporaneous exogenous

    • If y is a vector, the target is the first element y[0]
    • The elements y[1:] are contemporaneous exogenous variables, not known in advance.
    • Missing data can be supplied to some skaters, as np.nan.
    • Most skaters will accept scalar y and a if there is only one of either.
  • Variables known k-steps in advance, or conditioning variables:

    • Pass the vector argument a that will occur in k-steps time (not the contemporaneous one)
    • Remark: In the case of k=1 there are different interpretations that are possible beyond "business day", such as "size of a trade" or "joystick up" etc.
  • Hyper-Parameter space:

    • A float r in (0,1).
    • This package provides functions to_space and from_space, for expanding to R^n using space filling curves, so that the callee's (hyper) parameter optimization can still exploit geometry, if it wants to.

See FAQ or file an issue if anything offends you greatly.

Related illustrations

Tuning pre-skaters

Cite

Thanks

    @electronic{cottontimemachines,
        title = {{Timemachines: A Python Package for Creating and Assessing Autonomous Time-Series Prediction Algorithms}},
        year = {2021},
        author = {Peter Cotton},
        url = {https://github.com/microprediction/timemachines}
    }
Comments
  • TypeError: evaluate_mean_squared_error_with_sporadic_fit() got an unexpected keyword argument 'e'

    TypeError: evaluate_mean_squared_error_with_sporadic_fit() got an unexpected keyword argument 'e'

    Hi,

    I am testing the examples and get the following error with this example code:

    
    from timemachines.skatertools.tuning.hyperempirical import optimal_r_for_stream
    from timemachines.skaters.proph.prophskaterssingular import fbprophet_univariate_r2
    from humpday.optimizers.optunacube import optuna_tpe_cube
    from timemachines.skaters.proph.prophparams import PROPHET_META, prophet_params
    from pprint import pprint
    from timemachines.skatertools.data.live import random_regular_stream_name
    
    # Illustrates how to find the best hyper-parameter r in (0,1), and interpret this as two prophet hyper-parameters
    # We use a random stream from https://www.microprediction.org/browse_streams.html
    # Your should expect this to take many hours. A time update is provided after the first function evaluation.
    
    
    if __name__=='__main__':
        name, url = random_regular_stream_name(min_len=PROPHET_META['n_warm'], with_url=True)
        print('We will find the best fbprophet hyper-parameters for '+url)
        print("Prophet will be fit for most of them, after a burn_in, and for many different hyper-params. Don't hold your breathe.")
    
        best_r, best_value, info = optimal_r_for_stream(f=fbprophet_univariate_r2,name=name,k=10,optimizer=optuna_tpe_cube,
                                                        n_burn=PROPHET_META['n_warm']+20,n_trials=50,n_dim=2)
        pprint(info)
        params = prophet_params(r=best_r,dim=2)
        pprint(params)
    
    
    We will find the best fbprophet hyper-parameters for https://www.microprediction.org/stream_dashboard.html?stream=finance-futures-corn-change
    Prophet will be fit for most of them, after a burn_in, and for many different hyper-params. Don't hold your breathe.
    Traceback (most recent call last):
      File "D:\Anaconda3\envs\aim\lib\site-packages\IPython\core\interactiveshell.py", line 3444, in run_code
        exec(code_obj, self.user_global_ns, self.user_ns)
      File "<ipython-input-9-3596626c8db7>", line 5, in <module>
        best_r, best_value, info = optimal_r_for_stream(f=fbprophet_univariate_r2,name=name,k=10,optimizer=optuna_tpe_cube,
      File "D:\Anaconda3\envs\aim\lib\site-packages\timemachines\skatertools\tuning\hyperempirical.py", line 36, in optimal_r_for_stream
        return optimal_r(f=f,y=y,k=k, a=None,t=t,e=None,evaluator=evaluator,optimizer=optimizer,n_trials=n_trials,
      File "D:\Anaconda3\envs\aim\lib\site-packages\timemachines\skatertools\tuning\hyper.py", line 54, in optimal_r
        a_test = objective(u=[0.5]*n_dim)  # Fail fast with easier trace
      File "D:\Anaconda3\envs\aim\lib\site-packages\timemachines\skatertools\tuning\hyper.py", line 50, in objective
        return evaluator(f=f, y=y, k=k, a=a, t=t, e=r, r=r, n_burn=n_burn)
    TypeError: evaluate_mean_squared_error_with_sporadic_fit() got an unexpected keyword argument 'e'
    
    opened by jmrichardson 9
  • (Documentation) Note on mutability of state passed to skater

    (Documentation) Note on mutability of state passed to skater

    Hi, I am not sure why predictions are not consistent. I ran the following:

    from timemachines.skaters.simple.thinking import thinking_slow_and_fast
    import numpy as np
    y = np.cumsum(np.random.randn(1000))
    s = {}
    x = list()
    for yi in y:
        xi, x_std, s = thinking_slow_and_fast(y=yi, s=s, k=3)
    

    Then, wanted to verify predictions using state variable "s" and the same y using the following simple loop code:

    for i in range(0, 10):
        x_new, x_std_new, s_new = thinking_slow_and_fast(y=yi, s=s, k=3)
        print(x_new)
    

    I was expecting to see the same predictions for each loop given that I am using the same yi and s variables (ie they haven't changed). But got different predictions:

    [-1.0763699106402587, -1.0762804377907655, -1.0761909649412726]
    [-1.0848981995166735, -1.08481700115846, -1.0847358028002463]
    [-1.0930360369514371, -1.0929623509702981, -1.092888664989159]
    [-1.1007996104897944, -1.1007327443804924, -1.1006658782711902]
    [-1.1082046070063825, -1.108143931623388, -1.108083256240394]
    [-1.115266209255507, -1.1152111531047109, -1.1151560969539147]
    [-1.1219990952068173, -1.1219491392351129, -1.1218991832634084]
    [-1.128417439789925, -1.1283721126322885, -1.1283267854746521]
    [-1.1345349187114502, -1.1344937923578347, -1.1344526660042193]
    [-1.1403647140440984, -1.1403273998910912, -1.140290085738084]
    

    Shouldn't using the same state "s" and the same "y" give us the same prediction?

    documentation 
    opened by jmrichardson 6
  • couple minor things I noticed

    couple minor things I noticed

    I've been using hyperopt and optuna for a while, very curious to see if any of the other optimizers do better, although honestly my use cases may be pretty simple and I suspect not that much difference.

    would add requirements.txt or conda environment.yml to make it easier to set up, see below

    in timemachines/optimizers/alloptimizers.py I see https://github.com/microprediction/timemachines/blob/main/timemachines/optimizers/alloptimizers.py#L40

    print(optimizer.__name__,(optimizer.__name__,optimizer(objective, n_trials=50, n_dim=5, with_count=True)))

    I think this should use the loop parameters per below?

    print(optimizer.__name__,(optimizer.__name__,optimizer(objective, n_trials=n_trials, n_dim=n_dim, with_count=True)))

    alloptimizers.py seems to run single_threaded, would consider pool.map to run many optimizations concurrently (but I'm not sure best way to do that). if that makes sense let me know and I can take a crack at a pull request. https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.map

    this is requirements.txt I have, can do a pull request, lmk, might need testing/adjusting,

    # may want to install fbprophet via conda, needs compiler, pystan
    ax-platform
    deap
    divinity
    fbprophet
    funcy
    hyperopt
    microconventions
    momentum
    nevergrad
    numpy==1.19.5
    optuna
    platypus-opt
    poap
    pydlm
    pymoo
    pystan
    pySOT
    swarmlib
    
    opened by druce 6
  • Not finding module named 'timemachines.skaters.ik'

    Not finding module named 'timemachines.skaters.ik'

    hi, I've tried loading the example in colab, and then locally in a new env. Both times, when going through the example to instantiate and use a model with the following code

    """ from timemachines.skaters.localskaters import local_skater_from_name f = local_skater_from_name('thinking_fast_and_slow') f """

    I get the following error:

    """

    ModuleNotFoundError Traceback (most recent call last) /var/folders/w5/yscn4zzs1y18mqqxft3z_gwh0000gn/T/ipykernel_86047/1074514103.py in ----> 1 from timemachines.skaters.localskaters import local_skater_from_name 2 f = local_skater_from_name('thinking_fast_and_slow') 3 f

    /opt/anaconda3/envs/timemachines/lib/python3.10/site-packages/timemachines/skaters/localskaters.py in 32 from timemachines.skaters.pycrt.allpycaretskaters import PYCRT_SKATERS 33 from timemachines.skaters.kts.allkatsskaters import KATS_SKATERS ---> 34 from timemachines.skaters.ik.allikskaters import IK_SKATERS 35 36 LOCAL_SKATERS = EMA_SKATERS + PROPHET_SKATERS + DIVINE_SKATERS + DLM_SKATERS + \

    ModuleNotFoundError: No module named 'timemachines.skaters.ik' """

    Any help with this error would be appreciated. The previous lines in the colab notebook work, so it is able to import something from timemachines.

    opened by jamjahal 5
  • timemachines cannot be installed on python 3.9, package pathlib causes problems

    timemachines cannot be installed on python 3.9, package pathlib causes problems

    not sure if other people encounter this

    WARNING: Discarding https://files.pythonhosted.org/packages/3c/a7/573e6c37775848cd2f9d0fcdf9dd168739f6534e6624573a968f3838d436/pathlib-0.1.tar.gz#sha256=d09e494964125084d67132c42b9e61fa4b428fa0dd8ae7aa2fb25925eeabc3e0 (from https://pypi.org/simple/pathlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement pathlib (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.97, 1.0, 1.0.1) ERROR: No matching distribution found for pathlib

    opened by KlausGlueckert 5
  • import error when trying to run the example on homepage

    import error when trying to run the example on homepage

    Hello, I pip installed timemachines 0.7.2 with python3.8.5 on Ubuntu 20.04 LTS successfully. I can import timemachines package. But can't run the example on homepage due to missing imports on the first line:

    from timemachines.skatertools.data import hospital_with_exog

    ---------------------------------------------------------------------------
    ImportError                               Traceback (most recent call last)
    <ipython-input-2-e7d8e2dd7f0b> in <module>
    ----> 1 from timemachines.skatertools.data import hospital_with_exog
          2 from timemachines.skatertools.visualization.priorplot import prior_plot
          3 import matplotlib.pyplot as plt
          4 
          5 # Get some data
    
    ImportError: cannot import name 'hospital_with_exog' from 'timemachines.skatertools.data' (/home/crayonfu/myProjects/ts_test/bt_venv/lib/python3.8/site-packages/timemachines/skatertools/data/__init__.py)
    

    I can't find the class of hospital_with_exog in the directory of timemachines/skatertools/data on github repo. Am I missing something here? Thank you.

    opened by crayonfu 4
  • timemachines/timemachines/optimizers/requirements.txt

    timemachines/timemachines/optimizers/requirements.txt

    add requirements.txt for optimizers

    includes optimizers that are imported but not currently used by alloptimizers.py, e.g. fbprophet, hyperopt

    locally I can install fbprophet with conda install fbprophet but not pip install fbprophet . but probably a local issue and in any event maybe not used

    opened by druce 4
  • Dependency Conflicts during Installation

    Dependency Conflicts during Installation

    Hi, I recently came across this repository and I really wanted to check out its results on some data as I have tried a lot of time series forecasting methods but most of them didn't seem to work well. I tried to set up timemachines on Google Colab but I run into dependency conflicts.

    u8darts 0.16.0 requires scikit-learn>=1.0.1, but you have scikit-learn 0.24.2 which is incompatible.
    u8darts 0.16.0 requires statsmodels>=0.13.0, but you have statsmodels 0.12.1 which is incompatible.
    salesforce-merlion 1.1.1 requires numpy>=1.21; python_version >= "3.7", but you have numpy 1.19.5 which is incompatible.
    salesforce-merlion 1.1.1 requires scipy>=1.6.0; python_version >= "3.7", but you have scipy 1.5.4 which is incompatible.
    salesforce-merlion 1.1.1 requires statsmodels>=0.12.2, but you have statsmodels 0.12.1 which is incompatible.
    greykite 0.3.0 requires pandas<1.3,>=1.1.3, but you have pandas 1.3.5 which is incompatible.
    greykite 0.3.0 requires statsmodels>=0.12.2, but you have statsmodels 0.12.1 which is incompatible.
    google-colab 1.0.0 requires ipython~=5.5.0, but you have ipython 7.31.1 which is incompatible.
    google-colab 1.0.0 requires pandas~=1.1.0; python_version >= "3.0", but you have pandas 1.3.5 which is incompatible.
    google-colab 1.0.0 requires requests~=2.23.0, but you have requests 2.27.1 which is incompatible.
    fbprophet 0.7.1 requires cmdstanpy==0.9.5, but you have cmdstanpy 0.9.68 which is incompatible.
    timemachines 0.15.0 requires numpy>=1.19.5, but you have numpy 1.19.3 which is incompatible.
    datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.
    albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible.
    

    I was wondering if you guys had some sort of installation script where the versions of each dependency are written because I can't really seem to resolve these conflicts.

    opened by muhammadtahasuhail 3
  • Documentation Question

    Documentation Question

    Hi,

    Was looking to find any instance / mention of Confidence or Prediction Intervals - could have this wrong, just a novice here looking into your package.

    Thanks!

    opened by omarsumadi 3
  • Add StatsForecastAutoARIMA to sk skaters

    Add StatsForecastAutoARIMA to sk skaters

    Concrete and pretty easy one. Simply need to include sktime's wrapping of Nixtia's fast autoarima.

    Steps:

    1. See skwrappers for example and make sf_autoarima_iskater in the mold of sk_autoarima_iskater

    2. Then add another function to skautoarima to include it, this is just a one-liner.

    Don't forget to review steps for adding batch style models

    enhancement help wanted good first issue high priority 
    opened by microprediction 2
  • [bug] thinking fast and slow

    [bug] thinking fast and slow

    Hi, Nice approach with "fast and slow" but I'm a little confused about: https://github.com/microprediction/timemachines/blob/main/timemachines/skaters/simple/thinking.py namely functions thinking_slow_and_fast and thinking_fast_and_slow looks exactly the same:

    def thinking_slow_and_fast(y :Y_TYPE, s:dict, k:int =1, a:A_TYPE =None, t:T_TYPE =None, e:E_TYPE =None)->([float] , Any , Any):
        """
               Apply defensive quickly moving average to residuals from a slowly moving average
        """
        return quickly_moving_hypocratic_residual_factory(y=y, s=s, k=k, a=a, t=t, e=e, f=slowly_moving_average)
    
    
    def thinking_fast_and_slow(y :Y_TYPE, s:dict, k:int =1, a:A_TYPE =None, t:T_TYPE =None, e:E_TYPE =None)->([float] , Any , Any):
        """
              Apply defensive slowly moving average to residuals from a quickly moving average
        """
        return quickly_moving_hypocratic_residual_factory(y=y, s=s, k=k, a=a, t=t, e=e, f=slowly_moving_average)
    

    maybe one of them should return: slowly_moving_hypocratic_residual_factory(y=y, s=s, k=k, a=a, t=t, e=e, f=quickly_moving_average) ?

    opened by mglowacki100 2
  • neuralforecast

    neuralforecast

    opened by microprediction 0
  • Overfit Wiggly Skaters?

    Overfit Wiggly Skaters?

    I'm trying to implement some wiggly skaters on a data set with about 20 observations and it seems to be overfitting to the original data. Am I giving it too much foresight with the y parameter or is 20 observations just insufficient to get a meaningfully smoothed outcome? y= random.sample(range(10, 30), 20) def posteriors(f,y): s = {}
    x = list() k=1 a=0 for yi in y: xi, xi_std, s = f(yi,s,k,a) x.append(xi[0]) return x

    opened by morash-sean 1
  • Flesh out sktime functionality

    Flesh out sktime functionality

    Been a while since I looked at sktime and they have added more stuff.

    Steps:

    See skwrappers for example and make sk_something_iskater in the mold of sk_autoarima_iskater

    Then add another function to a new module sksomething, say, like skautoarima

    Don't forget to review steps for adding batch style models

    enhancement help wanted high priority 
    opened by microprediction 0
Releases(v0.20.5)
Owner
Peter Cotton
Chief Data Scientist, Intech Investments
Peter Cotton
A simple example of ML classification, cross validation, and visualization of feature importances

Simple-Classifier This is a basic example of how to use several different libraries for classification and ensembling, mostly with sklearn. Example as

Rob 2 Aug 25, 2022
Primitives for machine learning and data science.

An Open Source Project from the Data to AI Lab, at MIT MLPrimitives Pipelines and primitives for machine learning and data science. Documentation: htt

MLBazaar 65 Dec 29, 2022
MooGBT is a library for Multi-objective optimization in Gradient Boosted Trees.

MooGBT is a library for Multi-objective optimization in Gradient Boosted Trees. MooGBT optimizes for multiple objectives by defining constraints on sub-objective(s) along with a primary objective. Th

Swiggy 66 Dec 06, 2022
PennyLane is a cross-platform Python library for differentiable programming of quantum computers

PennyLane is a cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural ne

PennyLaneAI 1.6k Jan 01, 2023
Machine Learning Techniques using python.

šŸ‘‹ Hi, Iā€™m Fahad from TEXAS TECH. šŸ‘€ Iā€™m interested in Optimization / Machine Learning/ Statistics šŸŒ± Iā€™m currently learning Machine Learning and Stat

FAHAD MOSTAFA 1 Jan 19, 2022
Implementation of deep learning models for time series in PyTorch.

List of Implementations: Currently, the reimplementation of the DeepAR paper(DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks

Yunkai Zhang 275 Dec 28, 2022
SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.

SageMaker Python SDK SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker. With the S

Amazon Web Services 1.8k Jan 01, 2023
Traingenerator šŸ§™ A web app to generate template code for machine learning āœØ

Traingenerator šŸ§™ A web app to generate template code for machine learning āœØ šŸŽ‰ Traingenerator is now live! šŸŽ‰

Johannes Rieke 1.2k Jan 07, 2023
BioPy is a collection (in-progress) of biologically-inspired algorithms written in Python

BioPy is a collection (in-progress) of biologically-inspired algorithms written in Python. Some of the algorithms included are mor

Jared M. Smith 40 Aug 26, 2022
Practical Time-Series Analysis, published by Packt

Practical Time-Series Analysis This is the code repository for Practical Time-Series Analysis, published by Packt. It contains all the supporting proj

Packt 325 Dec 23, 2022
This repo includes some graph-based CTR prediction models and other representative baselines.

Graph-based CTR prediction This is a repository designed for graph-based CTR prediction methods, it includes our graph-based CTR prediction methods: F

Big Data and Multi-modal Computing Group, CRIPAC 47 Dec 30, 2022
Polyglot Machine Learning example for scraping similar news articles.

Polyglot Machine Learning example for scraping similar news articles In this example, we will see how we can work with Machine Learning applications w

MetaCall 15 Mar 28, 2022
An implementation of Relaxed Linear Adversarial Concept Erasure (RLACE)

Background This repository contains an implementation of Relaxed Linear Adversarial Concept Erasure (RLACE). Given a dataset X of dense representation

Shauli Ravfogel 4 Apr 13, 2022
Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

Microsoft 366 Jan 03, 2023
AutoOED: Automated Optimal Experiment Design Platform

AutoOED is an optimal experiment design platform powered with automated machine learning to accelerate the discovery of optimal solutions. Our platform solves multi-objective optimization problems an

Yunsheng Tian 107 Jan 03, 2023
Made in collaboration with Chris George for Art + ML Spring 2019.

Deepdream Eyes Made in collaboration with Chris George for Art + ML Spring 2019.

Francisco Cabrera 1 Jan 12, 2022
Implementation of linesearch Optimization Algorithms in Python

Nonlinear Optimization Algorithms During my time as Scientific Assistant at the Karlsruhe Institute of Technology (Germany) I implemented various Opti

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

pmdarima Pmdarima (originally pyramid-arima, for the anagram of 'py' + 'arima') is a statistical library designed to fill the void in Python's time se

alkaline-ml 1.3k Dec 22, 2022
XGBoost + Optuna

AutoXGB XGBoost + Optuna: no brainer auto train xgboost directly from CSV files auto tune xgboost using optuna auto serve best xgboot model using fast

abhishek thakur 517 Dec 31, 2022
A logistic regression model for health insurance purchasing prediction

Logistic_Regression_Model A logistic regression model for health insurance purchasing prediction This code is using these packages, so please make sur

ShawnWang 1 Nov 29, 2021