Releases: Techtonique/nnetsauce
Releases · Techtonique/nnetsauce
v0.16.3
- add robust scaler
- relatively faster scaling in preprocessing
- Regression-based classifiers (see https://www.researchgate.net/publication/377227280_Regression-based_machine_learning_classifiers)
DeepMTS
(multivariate time series forecasting with deep quasi-random layers): see https://thierrymoudiki.github.io/blog/2024/01/15/python/quasirandomizednn/forecasting/DeepMTS- AutoML for
MTS
(multivariate time series forecasting): see https://thierrymoudiki.github.io/blog/2023/10/29/python/quasirandomizednn/MTS-LazyPredict - AutoML for
DeepMTS
(multivariate time series forecasting): see https://github.com/Techtonique/nnetsauce/blob/master/nnetsauce/demo/thierrymoudiki_20240106_LazyDeepMTS.ipynb - Subsample continuous and discrete responses
v0.16.2
- 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
Automated Machine learning (AutoML)
- lazy predict for classification and regression (see https://thierrymoudiki.github.io/blog/2023/10/22/python/quasirandomizednn/nnetsauce-lazy-predict-preview)
- lazy predict for multivariate time series (see https://thierrymoudiki.github.io/blog/2023/10/29/python/quasirandomizednn/MTS-LazyPredict)
- lazy predict for deep quasi-randomized classifiers and regressors nnetworks (see this example for classification:
examples/lazy_custom_deep_classification.py
; and this example for regression:examples/lazy_custom_deep_regression.py
v0.14.0
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 notS3
, 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
classMTS
# !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
-
Fix error in nodes' simulation (base.py)
-
Use residuals and KDE for predictive simulations
-
plot
method for MTS (univariate and multivariate time series forecasting) objects -
this notebook contains some examples based on
nnetsauce
v0.13.0: https://github.com/Techtonique/nnetsauce/blob/master/nnetsauce/demo/thierrymoudiki_250923_nnetsauce_mts_plots.ipynb
100% numpy/scipy
100% numpy/scipy, rm Cython
Fix RandomBag in R
Fix RandomBag in R (problem with MemoryViews)
Fix RandomBag
Fix RandomBag (use input ndarrays in Cython)
fix sdist
fix sdist
RandomBagRegressor and MTS
- RandomBagRegressor: Bagging of models having
fit
andpredict
methods - MTS: can use pandas data frames (with date index yyyy-mm-dd)