Site icon R-bloggers

News from ESGtoolkit, ycinterextra, and nnetsauce

[This article was first published on T. Moudiki's Webpage - R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

In this post, I introduce new versions of ESGtoolkit, ycinterextra, and nnetsauce.

Contents

Feel free to jump directly to the section that has your interest:

1-ESGtoolkit

ESGtoolkit is no longer available from CRAN (archived). It can be installed from GitHub or from R universe.

installing ESGtoolkit

library(devtools)
devtools::install_github("Techtonique/ESGtoolkit")
# Enable universe(s) by techtonique
options(repos = c(
  techtonique = 'https://techtonique.r-universe.dev',
  CRAN = 'https://cloud.r-project.org'))

# Install some packages
install.packages('ESGtoolkit')

news from ESGtoolkit

In version v0.4.0, spline interpolation (stats::spline) is used for forward rates’ computation in esgfwdrates. New (and only, so far) interpolation options are: “fmm”, “periodic”, “natural”, “hyman” (type ?stats::spline in R console for more details on each interpolation method).

Here is an example (in function simG2plus, and more specifically for methodyc, whose possible values are now “fmm”, “periodic”, “natural”, “hyman”) in which you can see how this new choices will affect the simulation results.

G2++ simulations

2-ycinterextra

ycinterextra is no longer available from CRAN (archived). It can be installed from GitHub or from R universe.

installing ycinterextra

devtools::install_github("Techtonique/ycinterextra")
# Enable universe(s) by techtonique
options(repos = c(
  techtonique = 'https://techtonique.r-universe.dev',
  CRAN = 'https://cloud.r-project.org'))

# Install some packages
install.packages('ycinterextra')

news from ycinterextra

In version 0.2.0

3-nnetsauce

installing nnetsauce

Python version:

pip install nnetsauce
conda install -c conda-forge nnetsauce 
pip install git+https://github.com/Techtonique/nnetsauce.git

R version:

library(devtools)
devtools::install_github("Techtonique/nnetsauce/R-package")
library(nnetsauce)

news from nnetsauce

In version 0.11.3:

# Using a data frame input for forecasting with `MTS`

import nnetsauce as ns
import pandas as pd
from sklearn import linear_model


dataset = {
'date' : ['2001-01-01', '2002-01-01', '2003-01-01', '2004-01-01', '2005-01-01'],
'series1' : [34, 30, 35.6, 33.3, 38.1],    
'series2' : [4, 5.5, 5.6, 6.3, 5.1],
'series3' : [100, 100.5, 100.6, 100.2, 100.1]}
df = pd.DataFrame(dataset).set_index('date')
print(df)

# Adjust Bayesian Ridge and predict
regr5 = linear_model.BayesianRidge()
obj_MTS = ns.MTS(regr5, lags = 1, n_hidden_features=5)
obj_MTS.fit(df)
print(obj_MTS.predict())

# with credible intervals
print(obj_MTS.predict(return_std=True, level=80))
print(obj_MTS.predict(return_std=True, level=95))

To leave a comment for the author, please follow the link and comment on their blog: T. Moudiki's Webpage - R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.