SkillAgentSearch skills...

Nnetsauce

Statistical/Machine Learning using Randomized and Quasi-Randomized (neural) networks (currently Python & R)

Install / Use

/learn @Techtonique/Nnetsauce
About this skill

Quality Score

0/100

Supported Platforms

Zed

README

nnetsauce

nnetsauce logo

<hr>

Randomized and Quasi-Randomized (neural) networks.

PyPI PyPI - License Downloads Downloads HitCount Documentation

Contents

Installing for Python and R | Package description | Quick start | Contributing | Tests | Dependencies | Citing nnetsauce | API Documentation | References | License

Installing (for Python and R)

Python

  • 1st method: by using pip at the command line for the stable version
pip install nnetsauce

or if you want to use GPUs

pip install nnetsauce[jax]
  • 2nd method: using conda (Linux and macOS only for now)
conda install -c conda-forge nnetsauce 

or if you want to use GPUs

conda install -c conda-forge nnetsauce jax jaxlib

(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

R

See also https://thierrymoudiki.github.io/blog/2025/12/17/r/python/new-nnetsauce-R-uv

From docs.techtonique.net

install.packages('nnetsauce', repos = c('https://techtonique.r-universe.dev',
'https://cloud.r-project.org'))

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/.

Package description

A package for Statistical/Machine Learning using Randomized and Quasi-Randomized (neural) networks. See next section.

Quick start

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)

Contributing

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]

Tests

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

API Documentation

Citation (BibTeX entry)

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/Techtonique/nnetsauce}},
note={BSD 3-Clause Clear License. Version x.x.x},
year={2019--2024}
}}

References

  • Deep Quasi-Randomized neural Networks for classification (2024) https://www.researchgate.net/publication/380701207_Deep_Quasi-Randomized_neural_Networks_for_classification

  • 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

License

BSD 3-Clause © Thierry Moudiki, 2019.

View on GitHub
GitHub Stars20
CategoryEducation
Updated23d ago
Forks4

Languages

Jupyter Notebook

Security Score

95/100

Audited on Mar 17, 2026

No findings