Questions tagged [function-approximation]

A function that implements an approximation solution for a problem. In general, the function approximation problem asks us to select a function among a well-defined class that closely matches ("approximates") a target function in a task-specific way

In computer science, they are many times that we can not compute something with full accuracy, because it's infinite. For example, in order to compute the value of cosine(π), we perform some approximation.

The function that would perform the computation of cosine(π) approximately is a function that uses approximation.

This tag should be used for problems that have to do with functions that implement an approximation solution for a problem.

Sometimes, these functions receive an ε parameter, which controls the approximation. Usually, ε, is called an approximation factor.

64 questions
1
vote
0 answers

Convergence guarantee of Policy Gradient with function approximation

Is there any convergence proof of the Policy Gradient algorithm with "general" value/Q function approximation ? Seminal papers (Sutton1999 & Tsitsiklis1999) prove the theorem using a compatibility assumption (i.e. the Q-function approximation is…
1
vote
0 answers

Polynomial interpolation in python

I am studying function approximation and while trying to understand/implement polynomial interpolation I've found an example here. I find the code below a good example to understand what is actually going on instead of using ready functions, however…
1
vote
1 answer

How do you find an equation of a plane that best approximates 3 dimensional data in MATLAB?

I have the following 3 dimensional data in MATLAB: tau = [6e-9 30e-12 6e-9 30e-12]; E=[1e-3 50e-6 .01 1e-3]; k=[6.93774E-08 1.23666E-08 4.45261E-08 1.90789E-08]; plot3(tau, E, k,'*'); xlabel('tau (s)'); ylabel('Energy (J)'); zlabel('k'); You can…
user1068636
  • 1,871
  • 7
  • 33
  • 57
1
vote
2 answers

np.sum does not return exact summation

Consider the following numpy vector of number: a = np.array([.1, .2, .2, .2, .2, .1]) Obviously, the sum of these numbers gives 1. However, when computing b = np.sum(a) I get print (b) 0.9999999999999999 Could you anyone explain why and how to…
user1363251
  • 421
  • 1
  • 11
  • 24
1
vote
1 answer

Is this example of off policy correct?

I am reading Sutton and Barto and want to make sure I am clear. For Off Policy learning can we think of a robot in a particular terrain - say on sand - as the target policy but use the robot's policy for walking in snow as the behaviour policy? We…
BlueTurtle
  • 353
  • 4
  • 17
1
vote
0 answers

Are there approximation formulae for the Jacobi Theta Functions?

I am looking for a complex-number approximation formula for the Jacobi Theta Functions that only uses simple functions. By simple, I mean supported natively by most programming languages and does not involve too many special functions as…
1
vote
1 answer

Using approx function within tapply or by in R

I have a temperature profiler (tp) data for date, depth and temperature. The depth for each date is not exactly the same so I need to unify it to the same depth and set the temperature for that depth by linear approximation. I was able to do this…
Shajar
  • 87
  • 6
1
vote
1 answer

When using functional approximation in reinforcement learning how does one select actions?

This slide shows an equation for Q(state, action) in terms of a set of weights and feature functions. I'm confused about how to write the feature functions. Given an observation, I can understand how to extract features from the observation. But…
RussAbbott
  • 2,660
  • 4
  • 24
  • 37
1
vote
0 answers

How to best-fit a rational function approximation to Theodorsen's function using the lsqcurvefit function in Matlab?

I am using a rational function (polynomial ratio) to approximate Theodorsen's function. I am having issues in guessing the correct (most optimal) initial guess parameters using the lsqcurvefit function in Matlab. Is there a way to know what would be…
Jesus
  • 179
  • 2
  • 2
  • 13
1
vote
2 answers

Evaluating the inverse of a function

I need to evaluate the inverse of this function in the domain [0,1): There is an analytic inverse (which I won't bother putting here as it's quite big), but it only works for a limited range of the constant A, i.e. if A>0.385f(x). Then, I thought of…
1
vote
1 answer

Approximation of vector-valued multivariate function with arbitrary in- and output dimensions in Numpy/Scipy

Starting point is a m-dimensional vector-valued function , where the input is also a n-dimensional vector: . The in- and output of this function are numpy vectors. This function is expensive to calculate, so I need an…
1
vote
0 answers

Keras Regression to approximate function (goal: loss < 1e-7)

I'm working on a neural network which approximates a function f(X)=y, with X a vector [x0, .., xn] and y in [-inf, +inf]. This approximated function needs to have an accuracy (sum of errors) around 1e-8. In fact, I need my neural network to…
PA Masse
  • 21
  • 4
1
vote
1 answer

Create vector of complete Chebyshev polynomials in Julia (or MATLAB)?

Suppose we have a two dimensional function f(x,y) we want to approximate with a set of Chebyshev polynomials up to degree 2. Let the Chebyshev polynomial of degree j be Tj(x) or Tj(y). We usually approximate f(x,y) by constructing a function g(x,y)…
1
vote
1 answer

Approximating a simple sin() function with lasagne

I'm trying lasagne and the nolearn NeuralNet function to approximate a simple sin function. After all, neural nets are proven to be universal approximators, so I wanted to try lasagne on a simple non-linear function to show that fact experimentally.…
Jorge del Val
  • 111
  • 1
  • 3
1
vote
0 answers

How can I choose the features my q-learning with linear function approximation

I am developing AI using reinforcement-learning. It is a game that player should avoid bricks falling from sky. There are 20 bricks falling to the ground. game screen shot , game play video link I implemented AI using reinforcement-learning with…