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
0
votes
0 answers

2D (Fourier) Spaces with ApproxFun.jl

I am looking into ApproxFun.jl mainly in order to solve PDEs (this problem here is not specific to PDE solving though). I tried around a bit with some functionality of ApproxFun in 1D that I now like to transfer to 2D. Unfortunately, it is not clear…
max xilian
  • 463
  • 2
  • 11
0
votes
2 answers

How to upload a file to a storage location through URL using Azure function app

I want to upload the upload a file to a storage location through URL using Azure function app from Azure blob storage. I'm able to pull the file from Azure blob. But not able to upload the file through url. Below I have attached the code which i…
0
votes
0 answers

Training Neural network to predict sin(x) matlab

It's been 3 days since i'm trying to train many neural networks to predict sin(x) function, i'm using matlab 2016b (i have to work with it in my assignement) what i did : change layers duplicate dataset (big , small) add/sub periods shuffle the…
user5042545
0
votes
1 answer

Deep Belief Network for Function Approximation

I am using the deep neural network toolbox developed by Masayuki Tanaka at following link https://www.mathworks.com/matlabcentral/fileexchange/42853-deep-neural-network. Now I'm trying to use the deep belief network to do the function approximation.…
user6112462
0
votes
1 answer

Predicting new values in logistic regression

I am building a logistic regression model in tensorflow to approximate a function. When I randomly select training and testing data from the complete dataset, I get a good result like so (blue are training points; red are testing points, the black…
user4340135
0
votes
1 answer

How can I prepare the data that some values are very different to group?

Some values are so different from group because there are missing rows and the data is not continuous make my diffVal unusual. > df Date diffVal1 diffVal2 1 2017-05-31 04:01:00 718 483 2 2017-05-31 05:01:00 704 …
Mr.Takeo
  • 223
  • 3
  • 17
0
votes
1 answer

Reinforcement Learning in Dynamic Environment with large state -action space

I have a 500*500 grid with 7 different penalty values. I need to make an RL agent whose action space contains 11 actions. (Left, Right, Up, Down, 4 Diagonal Directions, Speed Up, Speed Down And Normal Speed). How can I solve this problem? The…
0
votes
0 answers

Linearly Interpolating a function not on a grid, but on a convex set of points in R

Suppose I have the set of points x1 = c(0,3,6) x2 = c(0,3,6) and I want to interpolate the function y <- function(x){x[1]^2 + x[2]^2} On set the set of points such that x1 + x2 <= 6. That is... z = x1 x2 0 0 0 3 3 0 …
0
votes
1 answer

Simplify complex fraction in matlab

I have a huge series of a nonlinear function. 3240910002558383085492736408270606958592 sin(x3_) 23950603179913084375 k10 x6_ 23950603179913084375 k9 x5_ ------------------------------------------------- - ---------------------------- -…
Karim
  • 252
  • 1
  • 4
  • 17
0
votes
1 answer

Fast approximation for sin/cos in MATLAB

I am trying to create a fast approximation of sin and cos in MATLAB, which is the current bottleneck in my program. Is there a faster method than the in-built routine? Bottleneck: On each iteration, obtain angles from complex sparse matrix A (50,000…
FlyingTurbine
  • 323
  • 2
  • 9
0
votes
1 answer

Difference between function approximator and optimization algorithm?

I just started learning about artificial neural networks and genetic algorithms and found that the difference between them is that ANN is a function approximator and that GA is an optimization algorithm (according to SO). Problem is I am not 100%…
0
votes
1 answer

square root n by computing the next Xi term

I am stuck on a problem from a textbook. It asks: Write your own square root approximation function using the equation Xk+1 = 1/2 * (Xk + n/(Xk), where X0 = 1. This equation says that the sqrt'n' can be found by repeatedly computing the next Xi…
Babeeshka
  • 105
  • 1
  • 4
  • 21
0
votes
1 answer

Finding values by linear interpolation in r

I have huge data that I need to find the values of several variables at a standard height. I want to interpolate linearly the values of the other variables at Height=c(0,100,200,250,400,500)and add them as new columns to the existing data. Here is…
0
votes
1 answer

Q-learning with linear function approximation

I would like to get some helpful instructions about how to use the Q-learning algorithm with function approximation. For the basic Q-learning algorithm I have found examples and I think I did understand it. In case of using function approximation I…
0
votes
0 answers

SCIPY - UnivariateSpline Approximation

I am trying to make an approximation of a noisy data with scipy, but it seems it doesn't work at this specific function. Applying the smoothing factor "s" does not change anything. I end up with interpolation instead of approximation. Oddly it…