Etr {nnR} | R Documentation |
Etr
Description
The function that returns the \mathsf{Etr}
networks.
Usage
Etr(n, h)
Arguments
n |
number of trapezoids to make. Note this will result in a set of trapezoids. A natural number. |
h |
width of trapezoids. A positive real number. Note: Upon instantiation with any continuous function this neural
network must be fed with |
Value
An approximation for value of the integral of a function. Must be instantiated
with a list of n+1
reals
References
Definition 2.33. Rafi S., Padgett, J.L., Nakarmi, U. (2024) Towards an Algebraic Framework For Approximating Functions Using Neural Network Polynomials https://arxiv.org/abs/2402.01058
Examples
Etr(5, 0.1)
seq(0, pi, length.out = 1000) |> sin() -> samples
Etr(1000 - 1, pi / 1000) |> inst(ReLU, samples)
seq(0, 2, length.out = 1000)^2 -> samples
Etr(1000 - 1, 2 / 1000) |> inst(Tanh, samples)
[Package nnR version 0.1.0 Index]