0
$\begingroup$

I have a function $f:x\mapsto \vec{y}$ with $x \in [0,1]$ and $\vec{y}=(y_1,...,y_n) \in \mathbb{R}^n$. $n$ is a small integer e.g. $n=8$. Each of the component functions in $y_i(x)$ "oscilate" up and down (roughly between -1.5 and 1.5). A snippet of two such component functions looks like this, Snippet of 2 component functions

I know that $f$ is invertible because it was designed to be bjective (using a numerical method). In other words, the vectors $\vec{y}$ are unique.

Edit: Another way to view this goes as follows. $\vec{y}$ is a set of codewords which encode each position $x$. The generating function $f(x)$ is designed so that these code words are unique.

I am searching for an efficient numerical inversion method for $f$. I.e., I am looking for $f^{-1}: \vec{y} \mapsto x$.

So far, I have tried a neural network (using sklearn.neural_network.MLPRegressor) with one hidden layer with 200 neurons. This works fine, but I am looking for a solution for which the evaluation of $f^{-1}$ is computationally cheaper. A solution which gives me a small number of possible candidates would be acceptable, too. How can I solve this problem?

$\endgroup$
  • $\begingroup$ Isn't it enough to just find the inverse of any one component of $\vec{y}$ since you know it is unique ? $\endgroup$ – cfdlab Jan 28 at 13:00
  • $\begingroup$ sorry, maybe that was not clear. Each of the components of $\vec{y}$ is not unique. Quite the oposite, they "oscilate" up and down (see picture). $\endgroup$ – Patrick Dietrich Jan 28 at 13:38
  • $\begingroup$ Each of the components $y_1, ..., y_n$ is not unique. Only the combined vector $\vec{y}$ is unique. $\endgroup$ – Patrick Dietrich Jan 28 at 13:44
  • $\begingroup$ The immediate thing that comes to my mind is to construct an interpolant (chebyshev, or piecewise polynomial) $t \to \vec{y}=f(t)$ (perhaps you already have this) and solve a least squares problem for the inversion, given $\vec{y}$ solve $\min_{t \in [0,1]} \| f(t) - \vec{y} \|$. Without trying it out, I cannot say if this will be slower/faster than neural network approach. Another way is find all roots of each equation $f_i(t)=y_i$ and find the common one, see e.g., Chebfun examples here chebfun.org/examples/roots which can find all roots and very accurate too. $\endgroup$ – cfdlab Jan 30 at 4:25
  • 2
    $\begingroup$ I don't understand how $f$ can be invertible if the components of $y$ are oscillatory. It looks like $f$ is not injective. Am I missing something here? $\endgroup$ – Tihskirap Ayayhdapu Jan 31 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.