New answers tagged

0

So, it happens that tsaplots.plot_pacf already computes the pacf. So, what I was running was the pacf of the pacf values... Instead, I should have simply run tsaplots.plot_pacf on the original data. Here's the correct graph.


0

As far as I understand the difference is $log(s_t)-log(s_{t-1})$, right? I'm not sure that doing the diff on the log value is the best option but this means: $$log(s_t)-log(s_{t-1})=log\left(\frac{s_t}{s_{t-1}}\right)$$ You could use exp to go back to the regular ratio: $$exp\left(log\left(\frac{s_t}{s_{t-1}}\right)\right)=\frac{s_t}{s_{t-1}}$$


0

There is a nice overview of possible techniques/models for R-Packages: https://cran.r-project.org/web/views/TimeSeries.html Especially have a look at the section "Multivariate Time Series Models" (e.g. Vector autoregressive (VAR) models). However, other approaches could be interesting for you as well. In case you have a sufficient amount of data, ...


0

Shuffling should be false in time series models because otherwise, you will be training the model on patterns it does not yet have access to. At each timestep, the model should only be trained up to the point of data visibility. e.g. at timestep 10, model should only be trained with data from 0 to 10 without visibality of data from 11 to 40. Otherwise you ...


0

Adapting to my setting, axes = df_box_cox["DAX"].plot() axes.ticklabel_format(axis='y', useOffset=False,style='plain')


0

This is more of a programming question than a data science question and would therefore be better suited to the stackoverflow stackexchange. The numbers you are seeing are related to ticklabel formats used by the matplotlib library. Changing the axis settings should allow you to get rid of the numbers on the top left of the plot: ax.ticklabel_format(...


2

The reason for the difference in the number of days between the two is that the EuStockMarkets dataset does not range from 1-1-1991 to 1-1-1998 but from 1-7-1991 to 14-08-1998 so you are comparing two different time ranges. > time(EuStockMarkets) Time Series: Start = c(1991, 130) End = c(1998, 169) Frequency = 260 Using the actual dates when ...


0

You could look into neural nets, e.g. using LSTM layers. There are examples, such as „Jena“ weather forecast with Keras: https://www.tensorflow.org/tutorials/structured_data/time_series https://keras.io/examples/timeseries/timeseries_weather_forecasting/ Alternatively, you can use VAR models (vector autoregressive models). If you use R, have a look here (...


0

One option is the book "Practical Time Series Analysis" by Aileen Nielsen.


0

The approach you're trying to describe is being able to fill the gaps in your data. Filling N/A in the data Since you're working in Python, I'm guessing your data is stored as a Dataframe. Pandas has a specific function for this: DataFrame.fillna(). This lets you fill any NaN values with multiple methods. There are some similar examples in this answer. ...


0

Def interval_check(data): Return (min(data) < data[-1]) and (data[-1] < max(data) ) Interval_check(the_data)


2

XGBoost, LightGBM, and CatBoost are almost always better than Random Forest in accuracy and they are similar to Random Forest. LightGBM is also much faster to calculate. They all work best if the time series features are added to the data. Lags, moving averages, standard deviations of different number of periods help improve accuracy significantly. Just look ...


3

Random Forest treats each row independently, so it will ignore any kind of time series correlations. You can verify this by shuffling your data before training, your model (aside from non-stochastic nature of Random Forest) will be the same.


0

First of all, are you sure you are using a MSE loss? If so, the loss should go hand in hand with your metric (MSE), especially since I see no Masking layer in your network. Plus, the MSE loss is not below zero, that would be impossible anyway. Additionally, the graph you provided does not match the numbers shown above. Does it come from different runs? ...


0

No - the word2vec algorithm assumes the data is a series of discrete symbols. Exchange rates are continuous.


2

Have you looked at the documentation of the function? psi and npsi seem to indicate the breakpoints and the number of breakpoints respectively. According to the documentation the psi argument can only be left empty when "1 breakpoint has to be estimated (and the median of the segmented variable is used as a starting value)". So if that's the case ...


1

The frequency parameter of statsmodels’ seasonal_decompose() method has been deprecated and replaced with the period parameter. Please use period in place of frequency. Since the data you provided is hourly, the period should be 24. The period determines how often the cycle repeats in the seasonal component. For example, with monthly data, the period would ...


Top 50 recent answers are included