nnetsauce

The news are (reminder: the nnetsauce.Lazy*s do automated Machine Learning benchmarking of multiple models):

  • Update LazyDeepMTS: no more LazyMTS class, instead, you can use LazyDeepMTS with n_layers=1
  • Specify forecasting horizon in LazyDeepMTS (see updated docs and examples/lazy_mts_horizon.py)
  • New class ClassicalMTS for classsical models (for now VAR and VECM adapted from statsmodels for a unified interface in nnetsauce) in multivariate time series forecasting (update 2024-09-18: not available in LazyDeepMTS yet)
  • partial_fit for CustomClassifier and CustomRegressor

ahead

The Python version now contains a class FitForecaster, that does conformalized time series forecasting (that is, with uncertainty quantification). It is similar to R’s ahead::fitforecast and an example can be found here:

https://github.com/Techtonique/ahead_python/blob/main/examples/fitforecaster.py

misc

misc is a package of utility functions that I use frequently and always wanted to have stored somewhere. The functions are mostly short, but (hopefully) doing one thing well, and powerful. misc::parfor is adapted from the excellent foreach::foreach. The difference is: misc::parfor calls a function in a loop. Two of the advantages of misc::parfor over foreach::foreach are:

  • you don’t have to register a parallel backend before using it. Just specify cl to use parallel processing (NULL for all the cores).
  • you can directly monitor the progress of parallel computation with a progress bar.

Here are a few examples of use of misc::parfor:

Installation

devtools::install_github("thierrymoudiki/misc")
library(misc)

Map

misc::parfor(function(x) x^2, 1:10)
misc::parfor(function(x) x^2, 1:10, cl = 2)
misc::parfor(function(x) x^2, 1:10, verbose = TRUE)
misc::parfor(function(x) x^3, 1:10, show_progress = FALSE)
misc::parfor(function(x) x^3, 1:10, show_progress = FALSE)
foo <- function(x)
{
  print(x)
  return(x*0.5)
}
misc::parfor(foo, 1:10, show_progress = FALSE, 
verbose = TRUE, combine = rbind)
misc::parfor(foo, 1:10, show_progress = FALSE, 
verbose = TRUE, combine = cbind)

Reduce

foo2 <- function(x)
{
  print(x)
  return(x*0.5)
}
misc::parfor(foo2, 1:10, show_progress = FALSE, 
verbose = TRUE, combine = '+')

If you want to develop an R package at the command line efficiently, you may also like:

xxx

Comments powered by Talkyard.