Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Pranav-India
    @Pranav-India

    Hi I am working on a price prediction kind of scenario and I have 6 parameter that will have impact on the prediction along with the Historic values of the price. I tried prediction with "forecast = ThetaForecaster(sp=12)" and I got the results out But when I checked the backend implementation of ThetaForecaster in fit function the description says we are ignoring exog

    "Parameters

        y : pd.Series
            Target time series to which to fit the forecaster.
        fh : int, list or np.array, optional (default=None)
            The forecasters horizon with the steps ahead to to predict.
        X : pd.DataFrame, optional (default=None)
            Exogenous variables are ignored
        Returns

    "
    so is there any different way to include x_train so it can be used for predictions?

    Franz Király
    @fkiraly
    @Pranav-India, in theory, if you use all_estimators (from registry module) to look for estimators with the tag "univariate_only" = False", this will give you the forecasters that make use of exogeneous data. You can get explanations on forecaster tags using all_tags. Unfortunately, the "univariate_only" tag is not named very descriptively, it should rather be called "uses_exogeneous" or similar. It's also not always correct - I just checked AutoARIMA, and it should be False but it's set to True, even though autoARIMA makes use of exogeneous variables. (I just opened an issue to fix this alan-turing-institute/sktime#1267)
    Franz Király
    @fkiraly

    is sktime supported by mac m1 chips at this time?

    Anyone has an answer to this?

    Pranav-India
    @Pranav-India
    Hi @fkiraly Thank you for your response . also the library is super helpful Thank you this..
    Brian
    @Data-drone
    I am trying to use cross-validation with sktime. I have set a cv with SlidingWindowSplitter with forecasting horizon set as 7 however in my results opject when I look at the results object, under y_pred and y_test I just see one value? not 7?
    Markus Löning
    @mloning
    Hi @Data-drone what do you mean by results object? Do you use evaluate or ForecastingGridSearchCV?
    Brian
    @Data-drone
    I used evaluate which I ran like evaluation_results = evaluate(forecaster=forecaster, y=train['target'].astype('float64'), cv=cv, return_data=True)
    Markus Löning
    @mloning
    @Data-drone okay your code looks fine to me, could you post a code snippet to reproduce that behaviour?
    Brian
    @Data-drone
    import pandas as pd
    import numpy as np
    from sktime.datasets import load_airline
    from sktime.forecasting.base import ForecastingHorizon
    from sktime.forecasting.theta import ThetaForecaster
    from sktime.forecasting.model_selection import SlidingWindowSplitter
    from sktime.forecasting.model_evaluation import evaluate
    
    y = load_airline()
    
    forecaster = ThetaForecaster(sp=12)  # monthly seasonal periodicity
    
    cv = SlidingWindowSplitter(fh=7, window_length=28, step_length=7)
    
    evaluation_results = evaluate(forecaster=forecaster, y=y, 
             cv=cv, return_data=True)
    
    print("Length train: {0}".format(len(evaluation_results.y_train[0])))
    
    print("Length pred: {0}".format(len(evaluation_results.y_pred[0])))
    Here is some working code. Based on the settings in SlidingWindowSplitter I thought that len(evaluation_results.y_pred[0]) would be 7
    Chaim Yosef Glancz
    @chaimglancz
    hi Brian @Data-drone I think this works fh=[1,2,3,4,5,6,7]
    Chaim Yosef Glancz
    @chaimglancz
    hi @mloning I'm working on sliding vs expanding and it looks like there is a mistake in there but maybe I'm wrong
    Chaim Yosef Glancz
    @chaimglancz
    hi @mloning I'm working on sliding vs expanding WindowSplitter and it looks like there is a mistake in there but maybe I'm wrong
    I put a print function in the model's files and here is how it looks
    we see that the sliding window doesn't get a small window the first time as you can see by the errors
    https://drive.google.com/file/d/1qsuTRKFJcL4eFXiBIuguM-Mu0wkpQrRP/view?usp=sharing
    https://drive.google.com/file/d/1yD25rlej5sheo9nWcrfEFBA_sEfdf19B/view?usp=sharing
    _
    Brian
    @Data-drone
    @chaimglancz Ah okay thanks. I thought if I set the horizon as 7 it would forecast 7 periods from just the value for 7 periods ahead
    Ilyas Moutawwakil
    @IlyasMoutawwakil
    Hi I was wondering why can't we get past predictions (by that I mean predictions made by the model on the train set) in sktime, actually one of the most fundamental ways to compare models is to compare their performance on train set relatively to test set performance and see if they're over-fitting: if the model performance on train set is way better than it is one the test/validation set. But in sktime we can only (I guess) see future predictions because of the fh argument that starts at 1 (as the first prediction after train set) which means we can only compare y_pred to y_test (as in cross-validation).
    most of the forecasters are from statsmodels or return a statsmodels (or prophet) forecaster where it's possible to do the predictions I'm mentionning above.
    Franz Király
    @fkiraly
    @ilyasmoutawwakil, yes, you can do backtesting etc, check out the forecasting tutorial (a function you can use for that is evaluate). For forecasters, the general model is that it can look at everything it has seen, so using a negative fh will not result in proper forecasts, evaluation will be too over-optimistic.
    Ilyas Moutawwakil
    @IlyasMoutawwakil
    so I'm trying to do some in sample predictions. it works with some forecasters (prophet) but not all of them (arima). It raises an error saying that In-sample predictions undefined for start=0 when d=1
    can someone explain to me why please
    Franz Király
    @fkiraly
    this was discussed in alan-turing-institute/sktime#1076
    the gist of it, I believe, is that ARIMA - as an abstract method - can't do this, as opposed to being an issue with the implementation
    in your opinion: what should be happening, if you ask for in-sample predictions for the earliest point (the one with index "0")?
    would be nice to see an example
    note that, naively, the ARIMA model with difference parameter d will need to have seen already d data points if you want to apply it to forecast, so it's not clear what a forecast would be before you have seen d points
    Ilyas Moutawwakil
    @IlyasMoutawwakil
    oh right now I see, since I used to use ARIMA models from statsmodel with d=0 I forgot that autoARIMA might return a model with d>0.
    What about returning None for points a model can't predict (makes sense in lots of contexts)
    Franz Király
    @fkiraly
    hmmmmmmm - yes, that sounds very sensible! I've updated alan-turing-institute/sktime#859 to be a "good first issue" with that request.
    (PS: if you haven't seen it, kindly resolve the merge conflict in your nice prophet upgrade alan-turing-institute/sktime#1378 so we can merge the PR)
    Ilyas Moutawwakil
    @IlyasMoutawwakil
    done
    Franz Király
    @fkiraly
    great, thanks, merged! So now on to 859, perhaps? :-)
    Ilyas Moutawwakil
    @IlyasMoutawwakil
    yess why not
    there's another thing I'm having troubles with and Idk if it's a bug or is it just me misusing joblib
    apparently if you make forecasters with maximum n_jobs (-1) and then feeded them to an AutoEnsembleForecaster whith maximum n_jobs (-1), joblib crashes somehow and fall into an infinite loop
    Franz Király
    @fkiraly
    strange, can you kindly write up a reproducible example and tag @aiwalter in the bug report?
    sounds like it´s a genuine bug
    Patrick Beart
    @pbeart
    Hey all, I'm really interested in further development of the proposal for supervised forecasting as described in https://github.com/sktime/enhancement-proposals/blob/master/steps/04_supervised_forecasting_api/step.md, unfortunately I'm very inexperienced with machine learning but are there any boilerplate tasks that I could work on to help get this moving?
    Patrick Beart
    @pbeart
    (I'm also particularly interested in the live learning aspects of what I've seen so if anyone has any suggestions on that outsie of sktime I'd love to hear them)
    Franz Király
    @fkiraly
    absolutely, there are some tasks you could work on - have you already made a pull request to sktime or another open source tool? The general recommendation is to "start small", even if you have good programming background, to get to grips with GitHub and collaborative coding. I'd recommend first picking a "good first issue" with low or trivial coding complexity to get familiar with the "GitHub" aspects.
    1 reply
    Here's a list alan-turing-institute/sktime#1147; here's a "boilerplate refactoring" task where you could pick one item alan-turing-institute/sktime#1146
    not supervised forecasting related, but, as said, to get familiar with the workflow
    and then successively "move up" :-)
    Ilyas Moutawwakil
    @IlyasMoutawwakil
    @fkiraly is there any forecasting algorithms in sktime for multivariate time series?
    Franz Király
    @fkiraly

    @ilyasmoutawwakil, v.0.8.0 added framework support for multivariate forecasting, i.e., tests, input/output checks etc. In that releas version, only two concrete learners are available - the NaiveForecaster, and ColumnEnsembleForecaster (which allows you to apply different forecasters to different columns, or the same forecaster to all columns). These were mainly used for testing and framework development. Generally, you can find the multivariate forecasters by searching the scitype:y tag for "multivariate" or "both" using all_estimators. Currently, a number of multivariate forecasters are under development or under review: pipeline, grid search alan-turing-institute/sktime#1376 alan-turing-institute/sktime#856; vector autoregression alan-turing-institute/sktime#1083.

    There's a few more forecasters that could be extended to multivariate, if you want to pick up any? alan-turing-institute/sktime#1364.

    Also, the forecasting notebook does not yet include discussion of the tag lookup or multivariate forecasting, see alan-turing-institute/sktime#1446 - that's also a todo where help would be appreciated.
    Ilyas Moutawwakil
    @IlyasMoutawwakil
    hi everyone, is there a reason for why sktime uses fbprophet and not prophet
    on prophet's github it says here that fbprophet is kinda ghosted:
    Version 1.0 (2021.03.28)
    Python package name changed from fbprophet to prophet
    Fixed R Windows build issues to get latest version back on CRAN
    Improvements in serialization, holidays, and R timezone handling
    Plotting improvements
    Chaim Yosef Glancz
    @chaimglancz
    The major dependency that prophet has is pystan and I have windows and pystan has problems by me with windows so I use only the old version with the name fbprophet so I'm happy that sktime also uses the old version
    Franz Király
    @fkiraly
    yes, indeed - we've tried upgrading but it broke so many things for us developers and users, we decided it might be such a major time and resource investment to upgrade it that we would focus on other things. Already the original version and its dependencies was really a hassle, see also this issue alan-turing-institute/sktime#666
    We've also been thinking of moving the Bayesian dependencies like pystan out of sktime core since they continue causing problems for users, but again that might be a major undertaking.