modeltime | Modeltime unlocks time series forecast models and machine | Machine Learning library
kandi X-RAY | modeltime Summary
kandi X-RAY | modeltime Summary
Modeltime is an amazing ecosystem for time series forecasting. But it can take a long time to learn:. Your probably thinking how am I ever going to learn time series forecasting. Here’s the solution that will save you years of struggling.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of modeltime
modeltime Key Features
modeltime Examples and Code Snippets
Community Discussions
Trending Discussions on modeltime
QUESTION
As I want to produce some visualizations and analysis on forecasted data outside the modeltime framework, I need to extract confidence values, fitted values and maybe also residuals.
The documentation indicates, that I need to use the function modeltime_calibrate() to get the confidence values and residuals. So one question would be, where do I extract the fitted values from?
My main question is whatsoever, how to do calibration on recursive ensembles. For any non-ensemble model I was able to do it, but in case of recursive ensembles I encounter some error messages, if I want to calibrate.
To illustrate the problem, look at the example code below, which ends up failing to calibrate all models:
...ANSWER
Answered 2021-Dec-01 at 11:13The problem lies in your recursive_ensemble_panel
. You have to do the recursive part on the models themselves and not the ensemble. Like you I would have expected to do the recursive in one go, maybe via modeltime_table
.
QUESTION
I use a custom step function that I have built for a package of mine that works just fine, it is in a local copy of the package (Not yet submitted to CRAN) link to function here: step_hai_fourier
Here is the session info (we can see healthyR.ai 0.0.2.9000 is loaded):
...ANSWER
Answered 2021-Nov-10 at 15:35This is fixed by adding functions .onLoad to register s3 methods
commit: https://github.com/spsanderson/healthyR.ai/commit/89671ff138e61d07a5dbdfcd7e0a694144aa3e08
QUESTION
I want to extract, .metrics (RMSE) from a Rolling origin forecast resampling (tibble: 52 x 5) by "id" columns which consist of slices.
The replicating codes are given below. Here is my attempt.
...ANSWER
Answered 2021-Nov-05 at 14:26After spending some time, I found a solution, which may not be very elegant though, it solves the problem.
QUESTION
Currently I am doing some experiments with hyperparameter tuning for XGBoost regression on time series, using a latin hypercube sampling strategy. When running the code below, all the models fail during the tune_grid operation. The cause seems to be the recipe object. I used step_dummy() to transform the value column of my univariate time series In the .notes object appears the Error message: preprocessor 1/1: Error: unused argument (values)
I found some other post where this issue popped up, but none of the solutions helped in my case.
...ANSWER
Answered 2021-Oct-27 at 16:19It looks like the problem is that those date predictors aren't getting converted to numeric values, which xgboost needs. You did use step_dummy()
but dates are not factor/nominal variables so they are not getting chosen by all_nominal()
. If you explicitly choose them, this is what happens:
QUESTION
as I come from a classical time series analysis approach, I am still kinda new to parameter tuning. As tuning all local models (couple of hundreds of time series for product demand in my case) turns out to be not even near scalability, I want to analyze first the effect of tuning time series with low accuracy values, to evaluate the trade-off between scalability and accuracy, to see if tuning is justified for a particular time series issue. When I run the code below, it seems like I didn't properly specify the ranges for the regular grid. I think so, because it seems odd, to retrieve only three combinations for a tree value with range from 50 to 2000. Is this standard behavior? Does changing the levels argument help in this case somehow? It didn't change anything in my case. Also, is there a way to retrieve the optimal number of folds for resampling, rather than guessing it? I hope for some advise or useful examples.
Thanks in advance!
...ANSWER
Answered 2021-Oct-18 at 13:37You're right on the money! Changing the levels
parameter in grid_regular()
is how you can increase the number of parameters to try within your range. Here's a few examples - hope this helps!
QUESTION
I've got a simple CSV log file, reading it into a list and charting it is really easy in LINQPad, but I'd like to update the format and the ticks on the x-axis.
Here's my code:
...ANSWER
Answered 2021-Oct-04 at 02:46Thanks to Joe Albahari's comment I've got it working and I've also customized the tool tip on the data point.
Using .ToWindowsChart()
gives you a System.Windows.Forms.DataVisualization.Charting.Chart
from there you can access the xAxis
for customization. I also added a handler to the chart.GetToolTipText
event to set the custom text to show both the x and y values.
QUESTION
below I created some fake forecast data using the tidyverse modeltime packages. I have got monthly data from 2016 and want to produce a test fc for 2020. As you can see, the data I load comes in wide format. For usage in modeltime I transform it to long data. After the modeling phase, I want to create a dataframe for the 2020 prediction values. For this purpose I need to somehow "unmelt" the data. In this process I am unfortunately losing a lot of variables. From 240 variables that I want to forecast I get only 49 in the end result. Maybe I am blind, or I do not know how to configure the modeltime functions correctly. I would really much appreciate some help. Thanks in advance!
...ANSWER
Answered 2021-Sep-15 at 15:26Here is my full solution. I also have provided background on what I'm doing here: https://github.com/business-science/modeltime/issues/133
QUESTION
When working with time series through the modeltime / tidymodels framework, the following workflow is presented to verify the performance of the models with cross validation.
...ANSWER
Answered 2021-Feb-10 at 12:30I believe understanding the procedure a bit more will help. When you Modeltime Resample is designed to take your model's specification and refit it repeatedly to resampled data.
What is resampling?It's the idea that we want to test how our models would have performed given that the models were trained on subsets of the data. This is useful in understanding our confidence in the models and how it changes especially with time series (temporal) data. Resampling require re-training and re-evaluating the model specification on each resample (train/test 1, train/test 2, ..., train/test N).
What is a model specification?- It's the parameters you've specified and model type (modeling function and engine)
- It's not the "Fitted Model" (meaning it doesn't make predictions with your model)
Modeltime Resample uses the
fit_resamples()
function fromtune
and applies to each model in a modeltime table containing one or more models.The refitting process ignores your "fitted model", but copies the parameters selected and the modeling specification to repeated fit (train) new models to the resamples.
The result is how your model would have performed if fitted on different samples of the data. You can display the results using the plotting and table utilities.
Examples from the Panel Data Tutorial:
QUESTION
I have publicly shares a small dataset on Google Drive and I have made the file accessible to anyone with the link.
I wish to download this file into R for analysis but I am having difficulty with unzipping the file from the temp directory.
My code looks as follows:
...ANSWER
Answered 2021-Jan-05 at 01:04What you have is a URL for viewing, you should obtain the URL for editing/downloading the file.
The following works for me.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install modeltime
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page