Package: nn2poly 1.0.1.9000

Pablo Morala

nn2poly: Neural Network Weights Transformation into Polynomial Coefficients

Implements a method that builds the coefficients of a polynomial model that performs almost equivalently as a given neural network (densely connected). This is achieved using Taylor expansion at the activation functions. The obtained polynomial coefficients can be used to explain features (and their interactions) importance in the neural network, therefore working as a tool for interpretability or eXplainable Artificial Intelligence (XAI). See Morala et al. 2021 <doi:10.1016/j.neunet.2021.04.036>, and 2023 <doi:10.1109/TNNLS.2023.3330328>.

Authors:Pablo Morala [aut, cre], Iñaki Ucar [aut], Jose Ignacio Diez [ctr]

nn2poly_1.0.1.9000.tar.gz
nn2poly_1.0.1.9000.zip(r-4.7-x86_64)nn2poly_1.0.1.9000.zip(r-4.6-x86_64)nn2poly_1.0.1.9000.zip(r-4.5-x86_64)
nn2poly_1.0.1.9000.tgz(r-4.6-x86_64)nn2poly_1.0.1.9000.tgz(r-4.6-arm64)nn2poly_1.0.1.9000.tgz(r-4.5-x86_64)nn2poly_1.0.1.9000.tgz(r-4.5-arm64)
nn2poly_1.0.1.9000.tar.gz(r-4.7-arm64)nn2poly_1.0.1.9000.tar.gz(r-4.7-x86_64)nn2poly_1.0.1.9000.tar.gz(r-4.6-arm64)nn2poly_1.0.1.9000.tar.gz(r-4.6-x86_64)
nn2poly_1.0.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
nn2poly/json (API)

# Install 'nn2poly' in R:
install.packages('nn2poly', repos = c('https://ibidat.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ibidat/nn2poly/issues

Pkgdown/docs site:https://ibidat.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

openblascpp

6.69 score 11 stars 30 scripts 319 downloads 4 exports 3 dependencies

Last updated from:c09b74b592. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK163
linux-devel-x86_64OK161
source / vignettesOK214
linux-release-arm64OK138
linux-release-x86_64OK168
macos-release-arm64OK121
macos-release-x86_64OK239
macos-oldrel-arm64OK115
macos-oldrel-x86_64OK206
windows-devel-x86_64OK152
windows-release-x86_64OK142
windows-oldrel-x86_64OK127
wasm-releaseOK135

Exports:add_constraintsfitluz_model_sequentialnn2poly

Dependencies:genericsRcppRcppArmadillo

Classification example using tensorflow
Multiclass classification example | Data preparation | Neural network | Build and train the NN | NN Predictions | Polynomial representation | Using nn2poly | Obtaining polynomial predictions | Visualizing the results

Last update: 2026-07-16
Started: 2024-01-15

Introduction to nn2poly
nn2poly package goal | This vignette: a first example | Polynomial structure in nn2poly | Simulated data | Original neural network | Building the needed input for default nn2poly | Polynomial obtained with nn2poly from weights and activation functions | Predictions using the obtained polynomial | Visualizing the results

Last update: 2026-07-16
Started: 2022-01-15

Supported DL frameworks
Data generation | Supported frameworks examples | keras/tensorflow | Model definition | Training | NN predictions | Using nn2poly | luz/torch | Data loader for torch

Last update: 2026-07-16
Started: 2024-01-15