Code Monkey home page Code Monkey logo

sknifedatar's Introduction

Hi! 🤟 I'm Rafa

Actuary / Data Scientist

📌 You can check my Blog Posts where I share my experiences and data science projects 📖

Connect with me:

rafael-zambrano rafael-zambrano-blog

Languages and Tools:

aws python R scikit_learn tidyverse tidymodels reticulate git

Rafael Zambrano

sknifedatar's People

Contributors

karbartolome avatar rafaelzambrano1992 avatar rafzamb avatar rodserr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sknifedatar's Issues

1-year ahead forecast using additional predictor(s)

This has reference to the example given in https://karbartolome-blog.netlify.app/posts/workflowsets-timeseries/

Objective is to forecast using additional predictors including date-related predictors. As for example given in above link:

Lagged values: 1 to 6 months lag

recipe_date_extrafeatures_lag <- recipe_date_extrafeatures %>%
step_lag(value, lag = 1:6) %>%
step_ts_impute(all_numeric(), period=365)

The code above has predictors related to Date as well as lags predictors (say X).

FUTURE FORECAST -----

If one needs to forecast 1-year ahead (say, .h = '1 year') after refitting using full data set (training + testing), then one needs also future 1-year X values as well as predictors related to Date. If this the case, it is needed to collect/prepare future 1-year X values as well. Any idea about the concept has been used in the code.

The code given to refit using full data set (training + testing):

wfrefits <- modeltime_wfs_refit(.wfs_results = wffits_best, .serie = data)

Future forecast

wfrefits_forecast <- modeltime_wfs_forecast(.wfs_results = wfrefits,
.serie = data,
.h = '1 year',
.split_prop = split_prop)

Interested to know, how the lags predictors (say X) have been incorporated for 1-year ahead forecast.

Multiple Outputs on one tabset

It would be nice if automagic_tabs could deploy multiple outputs in the same tabset group. This could be a solution #7 . Also, it avoids calling xaringanExtra before automagic_tabs()

The outcome column must be named "value"?

Hello, I am new with sknifedatar, so I have tried this tutorial:

https://github.com/rafzamb/sknifedatar

But with different dataset which contains outcome column named "hits" instead "value",

When I tried run this syntax:

model_table_emae = modeltime_multifit(serie = nested_serie %>% head(3),
                                       .prop = 0.8,
                                       m_auto_arima,
                                       m_stlm_arima,
                                       m_nnetar)

Error: Problem with mutate() input m_auto_arima. x object 'value' not found i Input m_auto_arima is purrr::map(...).

image

This problem solved when I changed colnames "hits" to "value".

The column date must be ordered by ascending?

Hello, I have tried this tutorial

https://github.com/rafzamb/sknifedatar

I found some bug (or restriction maybe?). Sknifedatar will give wrong test dataset if the column date is not ordered by ascending.

Lets try this
ORIGINAL
nested_serie = emae_series %>% filter(date < '2020-02-01') %>% nest(nested_column=-sector)

EXPERIMENT
nested_serie = emae_series %>% filter(date < '2020-02-01') %>% arrange(desc(date)) %>% nest(nested_column=-sector)

The result is like this:
testing

and this
forecast

I aware this problem since I tried with another dataset which have random order of date column.

problem installing sknifedatar

hello
i'm trying to install the package with devtools::install_github("rafzamb/sknifedatar") in windows 10, but i get this error:
"> devtools::install_github("rafzamb/sknifedatar")
Downloading GitHub repo rafzamb/sknifedatar@HEAD
Error: Failed to install 'sknifedatar' from GitHub:
input string 88 is invalid
Además: Warning message:
In gsub("[^/]", "", file_list) :
unable to translate 'rafzamb-sknifedatar-af29fe7/docs/articles/automatic_tabs_files/figure-html/r automagic_chunk_data_filter_Industria manufacturera <d4><dc>ִ<a9><c5>-1.png' to a wide string"

i'm also trying to install locally with devtools::install_local(path = "C:\\Users\\user\\Downloads\\Compressed/sknifedatar-master/"), but those errors:
Error: Failed to install 'sknifedatar' from local:
lazy-load database 'C:/Users/vjvelascorios/AppData/Local/R/win-library/4.3/pkgbuild/R/pkgbuild.rdb' is corrupt
Además: Warning messages:
1: In file.copy(savedcopy, lib, recursive = TRUE) :
problema al copiar C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\00LOCK\digest\libs\x64\digest.dll a C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\digest\libs\x64\digest.dll: Permission denied
2: In file.copy(savedcopy, lib, recursive = TRUE) :
problema al copiar C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\00LOCK\data.table\libs\x64\data_table.dll a C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\data.table\libs\x64\data_table.dll: Permission denied
3: In file.copy(savedcopy, lib, recursive = TRUE) :
problema al copiar C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\00LOCK\htmltools\libs\x64\htmltools.dll a C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\htmltools\libs\x64\htmltools.dll: Permission denied
4: In file.copy(savedcopy, lib, recursive = TRUE) :
problema al copiar C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\00LOCK\processx\libs\x64\processx.dll a C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\processx\libs\x64\processx.dll: Permission denied
5: In file.copy(savedcopy, lib, recursive = TRUE) :
problema al copiar C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\00LOCK\curl\libs\x64\curl.dll a C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\curl\libs\x64\curl.dll: Permission denied
6: In file.copy(savedcopy, lib, recursive = TRUE) :
problema al copiar C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\00LOCK\StanHeaders\libs\x64\StanHeaders.dll a C:\Users\vjvelascorios\AppData\Local\R\win-library\4.3\StanHeaders\libs\x64\StanHeaders.dll: Permission denied
7: In i.p(...) : installation of package ‘bslib’ had non-zero exit status
8: In safe_build_package(pkgdir, build_opts, build_manual, build_vignettes, :
internal error -3 in R_decompress1

could you help me?, please
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.