Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plans for R support? #14

Closed
AdrianAntico opened this issue Oct 28, 2019 · 14 comments
Closed

Plans for R support? #14

AdrianAntico opened this issue Oct 28, 2019 · 14 comments

Comments

@AdrianAntico
Copy link

Are there any plans for implementing this in R?

@avati
Copy link
Collaborator

avati commented Oct 28, 2019

Hi Adrian,

I would currently put this as low priority for us. I personally am not too familiar or comfortable with R. However we would VERY MUCH welcome contributions for R integration at API level.

@AdrianAntico
Copy link
Author

@avati What if I make it available in my R package via reticulate calls to Python for now?

@avati
Copy link
Collaborator

avati commented Oct 28, 2019

Hi @AdrianAntico, unfortunately I am not familiar with what reticulate is. Might be good to have R API be part of ngboost to keep the APIs in sync over versions. We do plan to make some simplification changes to the model creation API. Could you create a pull request so we can have a look and discuss?

@AdrianAntico
Copy link
Author

@avati reticulate is a package in R that allows R users to call Python functions. An example of its use would be the keras pacakge in R, which is a set of reticulate bindings to call the Python functions to build those models. If you plan on making simplification changes, I can wait till the version is in a steady state before I do anything.

@avati
Copy link
Collaborator

avati commented Oct 28, 2019

The plan is to have the following new classes: NGBRegressor, NGBClassifier, NGBSurvival etc. in place of the current single NGBoost which takes different probability distributions and scoring rules as parameters. The new classes will just invoke NGBoost internally with the appropriate probability distribution, scoring rule and base learner. That's the simplification I was referring to. Otherwise it sounds like reticulate is just providing language bindings, and should be a fine addition/contribution!

@AdrianAntico
Copy link
Author

@avati Thanks for the update!

@avati
Copy link
Collaborator

avati commented Nov 7, 2019

Closing this issue for now. Please re-open it if there are any updates!

@acca3003
Copy link

I have created a R version of NGBoost.
https://github.com/acca3003/ngboostR
It is a prelimiar version but you can test example.

@Akai01
Copy link

Akai01 commented Sep 9, 2021

I have created an R interface which is supporting all APIs and their public methods:
https://github.com/Akai01/ngboost

Using R6 (OO programming in R) and reticulate (enables running Python in R)

@Akai01
Copy link

Akai01 commented Jul 20, 2022

A forecasting package based on ngboost is available on CRAN: https://cran.r-project.org/web/packages/ngboostForecast/index.html

@AdrianAntico
Copy link
Author

@Akai01 I couldn't tell from the reference manual but is the forecasting for single series only at this point or does it support panel data?

@Akai01
Copy link

Akai01 commented Jul 20, 2022

@AdrianAntico It's a univariate time series forecasting technique. Please see the README file for further information on how to supply time series as ts objects. Univariate forecasting is faster since the base algorithm (ngboost) is single-core in nature. I'm also working on a panel version of it, but I don't expect to publish it on CRAN. The modeling strategy is as following:

The fitted forecasting model can be formulated as follows:
y = f(X) + e where X is a matrix of lags (order p) and Fourier transformation of y (in order K <= freq/2 where freq is the frequency of y) and other external variables if available. f() is the base learner and e is the error term which is assumed to be a martingale-difference sequence (A hart assumption!).
The reason for using Fourier transformation is to model seasonality.

The forecasting is done recursively.

@AdrianAntico
Copy link
Author

@Akai01 I didn't know it was a single threaded algorithm. Thanks for the heads up

@Akai01
Copy link

Akai01 commented Jul 20, 2022

@AdrianAntico see #156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants