Skip to content

Releases: Techtonique/nnetsauce

v0.16.3

16 Jan 06:41
Compare
Choose a tag to compare

v0.16.2

06 Jan 11:39
da7f5a6
Compare
Choose a tag to compare
  • AutoML for MTS (multivariate time series forecasting)
  • AutoML for DeepMTS (multivariate time series forecasting)
  • Subsample continuous and discrete responses
  • Regression-based classifiers

v0.15.0

10 Nov 06:10
8c14ce6
Compare
Choose a tag to compare

Automated Machine learning (AutoML)

v0.14.0

16 Oct 16:32
Compare
Choose a tag to compare

version 0.14.0 (R & Python)

  • update and align as much as possible with R version (new plotting function for multivariate time series (MTS), plot.MTS, is not S3, but it’s complicated)
# 0 - install packages ----------------------------------------------------

#utils::install.packages("remotes")
remotes::install_github("Techtonique/nnetsauce/R-package", force = TRUE)

# 1 - ENET simulations ----------------------------------------------------

obj <- nnetsauce::sklearn$linear_model$ElasticNet()
obj2 <- nnetsauce::MTS(obj, 
                       start_input = start(fpp::vn), 
                       frequency_input = frequency(fpp::vn),
                       kernel = "gaussian", replications = 100L)
X <- data.frame(fpp::vn)
obj2$fit(X)
obj2$predict(h = 10L)
typeof(obj2)

par(mfrow=c(2, 2))
plot.MTS(obj2, selected_series = "Sydney")
plot.MTS(obj2, selected_series = "Melbourne")
plot.MTS(obj2, selected_series = "NSW")
plot.MTS(obj2, selected_series = "BrisbaneGC")

# 2 - Bayesian Ridge ----------------------------------------------------

obj <- nnetsauce::sklearn$linear_model$BayesianRidge()
obj2 <- nnetsauce::MTS(obj,
                       start_input = start(fpp::vn), 
                       frequency_input = frequency(fpp::vn))
X <- data.frame(fpp::vn)
obj2$fit(X)
obj2$predict(h = 10L, return_std = TRUE)

par(mfrow=c(2, 2))
plot.MTS(obj2, selected_series = "Sydney")
plot.MTS(obj2, selected_series = "Melbourne")
plot.MTS(obj2, selected_series = "NSW")
plot.MTS(obj2, selected_series = "BrisbaneGC")
  • colored graphics for Python class MTS
# !pip install nnetsauce —upgrade

import nnetsauce as ns
import numpy as np
import pandas as pd
from sklearn.linear_model import Ridge, BayesianRidge
from sklearn.ensemble import RandomForestRegressor
from time import time

url = "https://raw.githubusercontent.com/thierrymoudiki/mts-data/master/heater-ice-cream/ice_cream_vs_heater.csv"

df = pd.read_csv(url)

# ice cream vs heater (I don't own the copyright)
df.set_index('Month', inplace=True)
df.index.rename('date')

df = df.pct_change().dropna()

idx_train = int(df.shape[0]*0.8)
idx_end = df.shape[0]
df_train = df.iloc[0:idx_train,]

regr3 = Ridge()
obj_MTS3 = ns.MTS(regr3, lags = 4, n_hidden_features=7, #IRL, must be tuned
                  replications=50, kernel='gaussian',
                  seed=24, verbose = 1)
start = time()
obj_MTS3.fit(df_train)
print(f"Elapsed {time()-start} s")

obj_MTS3.plot("heater")
obj_MTS3.plot("ice cream")

v0.13.0

25 Sep 13:07
Compare
Choose a tag to compare

100% numpy/scipy

16 Jan 16:44
Compare
Choose a tag to compare

100% numpy/scipy, rm Cython

Fix RandomBag in R

04 Apr 11:48
Compare
Choose a tag to compare

Fix RandomBag in R (problem with MemoryViews)

Fix RandomBag

04 Apr 10:30
Compare
Choose a tag to compare

Fix RandomBag (use input ndarrays in Cython)

fix sdist

13 Mar 19:20
4bfaf6c
Compare
Choose a tag to compare

fix sdist

RandomBagRegressor and MTS

13 Mar 14:55
Compare
Choose a tag to compare
  • RandomBagRegressor: Bagging of models having fit and predict methods
  • MTS: can use pandas data frames (with date index yyyy-mm-dd)