MATLAB: How do i approximate a continuous function using genetic algorithm with missing data points in between? I have used grnn and polynomial but i need to use genetic algorithm

anncurve fittinggenetic algorithmGlobal Optimization Toolbox

I have a non-linear set of complex data [1, 56] with missing data points in between samples (0 +0i). I want to get an estimate of the missing points. I have applied polynomial fitting, fourier data fitting and generalized regression neural network GRNN as provided in matlab. I want to try apply genetic algorithm or ANN to find the estimates but I have very little knowledge on how to apply it.
An example data is below. Someone help
%Data [-0.0417365444857040 – 0.271868130839040i 0.00000000000000 + 0.00000000000000i -0.0548944493205952 – 0.257884254511584i 0.00000000000000 + 0.00000000000000i -0.0695586236243316 – 0.248320118529290i 0.00000000000000 + 0.00000000000000i -0.0846008629061930 – 0.243128990333430i 0.00000000000000 + 0.00000000000000i -0.0989576641388920 – 0.242007657878774i 0.00000000000000 + 0.00000000000000i -0.111744481766727 – 0.244554592882944i 0.00000000000000 + 0.00000000000000i -0.122242428490083 – 0.250150946264662i 0.00000000000000 + 0.00000000000000i -0.129734711227411 – 0.258156448021893i 0.00000000000000 + 0.00000000000000i -0.133978207121788 – 0.267743678486230i 0.00000000000000 + 0.00000000000000i -0.134447749825747 – 0.278100378562962i 0.00000000000000 + 0.00000000000000i -0.131039446507618 – 0.288348888961752i 0.00000000000000 + 0.00000000000000i -0.123801579553360 – 0.297534888999071i 0.00000000000000 + 0.00000000000000i -0.112778950858014 – 0.304838945238205i 0.00000000000000 + 0.00000000000000i -0.0984838926120736 – 0.309253297167977i 0.00000000000000 + 0.00000000000000i -0.0720143592663076 – 0.308800575100266i 0.00000000000000 + 0.00000000000000i -0.0519993387174425 – 0.302526285727454i 0.00000000000000 + 0.00000000000000i -0.0313544245900846 – 0.290929973179540i 0.00000000000000 + 0.00000000000000i -0.0111406864493343 – 0.273494765412318i 0.00000000000000 + 0.00000000000000i 0.00734026104001643 – 0.250129007126314i 0.00000000000000 + 0.00000000000000i 0.0227726902392037 – 0.220884894817791i 0.00000000000000 + 0.00000000000000i 0.0337964303567136 – 0.186172954759804i 0.00000000000000 + 0.00000000000000i 0.0390026645798880 – 0.146764358318817i 0.00000000000000 + 0.00000000000000i 0.0373336850932240 – 0.103737936836998i 0.00000000000000 + 0.00000000000000i 0.0278176634524438 – 0.0583369336685638i 0.00000000000000 + 0.00000000000000i 0.00972823354318720 – 0.0121852944647230i 0.00000000000000 + 0.00000000000000i -0.0172054662190054 + 0.0329810307037693i 0.00000000000000 + 0.00000000000000i -0.0529376731327182 + 0.0754388224501527i 0.00000000000000 + 0.00000000000000i -0.0969379283499520 + 0.113342914459166i 0.00000000000000 + 0.00000000000000i]

Best Answer

You NEED to use a genetic algorithm? Sorry, but that is a meaningless statement. I can decide I need to do all sorts of silly things using the wrong tools. For example, suppose I see that my television set is broken, and my solution is to decide that I need to repair it using a large hammer. Odds are, I would be wasting my time, and asking others to tell me how to repair electronics equipment using a large hammer will receive no more than amusement rather than any serious help.
The point is, yours is a problem of interpolation. A genetic algorithm is an optimization tool. It has no capabilities to do interpolation, UNLESS you decide how to use an optimization tool to do interpolation.
To solve an interpolation problem, you need to learn how to do interpolation. So you might choose to use interp1. You might decide to use my own inpaint_nans, as posted on the file exchange. Each of these tools, if used correctly, can solve your problem. But they have no intrinsic need for a genetic algorithm, or for any general optimization tool.
Related Question