Randomized and Quasi-Randomized (neural) networks.
Installing for Python and R |
Package description |
Quick start |
Contributing |
Tests |
Dependencies |
Citing nnetsauce
|
API Documentation |
References |
License
-
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 conda-forge nnetsauce
(Note to self or developers: https://github.com/conda-forge/nnetsauce-feedstock and https://conda-forge.org/docs/maintainer/adding_pkgs.html#step-by-step-instructions and https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow)
- 3rd method: from Github, for the development version
pip install git+https://github.com/Techtonique/nnetsauce.git
or
git clone https://github.com/Techtonique/nnetsauce.git
cd nnetsauce
make install
From GitHub
remotes::install_github("Techtonique/nnetsauce_r") # the repo is in this organization
From R-universe
install.packages('nnetsauce', repos = c('https://techtonique.r-universe.dev',
'https://cloud.r-project.org'))
General rule for using the package in R: object accesses with .
's are replaced by $
's. R Examples can be found in the package, once installed, by typing (in R console):
?nnetsauce::MultitaskClassifier
For a list of available models, visit https://techtonique.github.io/nnetsauce/.
A package for Statistical/Machine Learning using Randomized and Quasi-Randomized (neural) networks. See next section.
There are multiple examples here on GitHub, plus notebooks (including R Markdown notebooks).
You can also read these blog posts.
Lazy Deep (quasi-randomized neural) networks example
!pip install nnetsauce --upgrade
import os
import nnetsauce as ns
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from time import time
data = load_breast_cancer()
X = data.data
y= data.target
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = .2, random_state = 123)
clf = ns.LazyDeepClassifier(n_layers=3, verbose=0, ignore_warnings=True)
start = time()
models, predictions = clf.fit(X_train, X_test, y_train, y_test)
print(f"\n\n Elapsed: {time()-start} seconds \n")
model_dictionary = clf.provide_models(X_train, X_test, y_train, y_test)
display(models)
Your contributions are welcome, and valuable. Please, make sure to read the Code of Conduct first. If you're not comfortable with Git/Version Control yet, please use this form to provide a feedback.
In Pull Requests, let's strive to use black
for formatting files:
pip install black
black --line-length=80 file_submitted_for_pr.py
A few things that we could explore are:
- Enrich the tests
- Any benchmarking of
nnetsauce
models can be stored in demo (notebooks) or examples (flat files), with the following naming convention:yourgithubname_yyyymmdd_shortdescriptionofdemo.[py|ipynb|R|Rmd]
Ultimately, tests for nnetsauce
's features will be located here. In order to run them and obtain tests' coverage (using nose2
), you'll do:
- Install packages required for testing:
pip install nose2
pip install coverage
- Run tests (in cloned repo) and print coverage:
make run-tests
make coverage
Replace Version x.x.x
by the version number you've used.
@misc{moudiki2019nnetsauce,
author={Moudiki, T.},
title={nnetsauce, {A} package for {S}tatistical/{M}achine {L}earning using {R}andomized and {Q}uasi-{R}andomized (neural) networks.},
howpublished={\url{https://github.com/thierrymoudiki/nnetsauce}},
note={BSD 3-Clause Clear License. Version x.x.x},
year={2019--2024}
}}
-
Probabilistic Forecasting with nnetsauce (using Density Estimation, Bayesian inference, Conformal prediction and Vine copulas): nnetsauce presentation at sktime meetup (2024) https://www.researchgate.net/publication/382589729_Probabilistic_Forecasting_with_nnetsauce_using_Density_Estimation_Bayesian_inference_Conformal_prediction_and_Vine_copulas
-
Probabilistic Forecasting with Randomized/Quasi-Randomized networks at the International Symposium on Forecasting (2024) https://www.researchgate.net/publication/381957724_Probabilistic_Forecasting_with_RandomizedQuasi-Randomized_networks_presentation_at_the_International_Symposium_on_Forecasting_2024
-
Moudiki, T. (2024). Regression-based machine learning classifiers. Available at: https://www.researchgate.net/publication/377227280_Regression-based_machine_learning_classifiers
-
Moudiki, T. (2020). Quasi-randomized networks for regression and classification, with two shrinkage parameters. Available at: https://www.researchgate.net/publication/339512391_Quasi-randomized_networks_for_regression_and_classification_with_two_shrinkage_parameters
-
Moudiki, T. (2019). Multinomial logistic regression using quasi-randomized networks. Available at: https://www.researchgate.net/publication/334706878_Multinomial_logistic_regression_using_quasi-randomized_networks
-
Moudiki T, Planchet F, Cousin A (2018). “Multiple Time Series Forecasting Using Quasi-Randomized Functional Link Neural Networks. ”Risks, 6(1), 22. Available at: https://www.mdpi.com/2227-9091/6/1/22
BSD 3-Clause © Thierry Moudiki, 2019.