News from ESGtoolkit, ycinterextra, and nnetsauce
Want to share your content on Rbloggers? 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.
 ESGtoolkit (for R) is a toolkit for Monte Carlo Simulation in Finance, Economics, Insurance, Physics, etc.
 ycinterextra (for R) is used for yield curve interpolation and extrapolation
 nnetsauce (for Python and R) does supervised Statistical/Machine Learning using Randomized and QuasiRandomized neural networks
Contents
Feel free to jump directly to the section that has your interest:
1ESGtoolkit
ESGtoolkit is no longer available from CRAN (archived). It can be installed from GitHub or from R universe.
installing ESGtoolkit
 From Github:
library(devtools) devtools::install_github("Techtonique/ESGtoolkit")
 From R universe:
# Enable universe(s) by techtonique options(repos = c( techtonique = 'https://techtonique.runiverse.dev', CRAN = 'https://cloud.rproject.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.
2ycinterextra
ycinterextra is no longer available from CRAN (archived). It can be installed from GitHub or from R universe.
installing ycinterextra
 From Github:
devtools::install_github("Techtonique/ycinterextra")
 From R universe:
# Enable universe(s) by techtonique options(repos = c( techtonique = 'https://techtonique.runiverse.dev', CRAN = 'https://cloud.rproject.org')) # Install some packages install.packages('ycinterextra')
news from ycinterextra
In version 0.2.0
 Rename function
as.list
to atolist
doing the same thing.ycinterextra::as.list
was notably causing bugs in Shiny applications  Refactor the code, to make it more readable
3nnetsauce
installing nnetsauce
Python version:
 1st method: by using
pip
at the command line for the stable version
pip install nnetsauce
 2nd method: using
conda
(Linux and macOS only for now)
conda install c condaforge nnetsauce
 3rd method: from Github, for the development version
pip install git+https://github.com/Techtonique/nnetsauce.git
R version:
library(devtools) devtools::install_github("Techtonique/nnetsauce/Rpackage") library(nnetsauce)
news from nnetsauce
In version 0.11.3:

Implementation of a
RandomBagRegressor
; an ensemble of CustomRegressors in which diversity is achieved by sampling the columns and rows of an input dataset. A Python example can be found here on GitHub. 
In
MTS
class (univariate and multivariate time series forecasting), no more lower and upper bounds of prediction intervals. Only standard deviation is returned whenreturn_std
is set toTrue
(see Python example below for more details). 
Use of pandas DataFrames in Python, for
MTS
(see Python example below for details)
# Using a data frame input for forecasting with `MTS` import nnetsauce as ns import pandas as pd from sklearn import linear_model dataset = { 'date' : ['20010101', '20020101', '20030101', '20040101', '20050101'], '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))
Rbloggers.com offers daily email 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/datascience job.
Want to share your content on Rbloggers? click here if you have a blog, or here if you don't.