algorithm - How can I find the intersection of 2 sets of noisy data? -
i'm writing script supposed remove redundant data points graph. data includes overlaps adjacent data sets , want data higher. (imagine 2 gaussians x offset overlap slightly. i'm interested in higher values in overlap region, final graph doesn't noisy when combine data in order make single spectrum.)
here problems:
1) x values aren't same between 2 data sets, can't "at x, take max y value". they're close together, not equal.
2) distances between x values aren't equal.
3) data noisy, there can multiple points data sets intersect. , while gaussian higher after intersection gaussian b, noise means gaussian b might still have values higher. meaning can't "always take highest values in x area", because i'd wildly combine noise of both data sets.
4) have n overlaps of type, need efficient algorithm , can come somewhere @ o(n^3), "for each overlap, store data sets 2 arrays , each combination of data points (x0,y0) , (x1,y1) cycle through until find lowest combination of abs(x1-x0) , abs(y1-y0)"
as i'm not programmer, i'm lost. wasn't able find algorithm problem anywhere - algorithms assume entries in arrays i'm comparing equal integers, i'm working almost-equal floats.
i'm using idl, i'd grateful general algorithm or @ least tip try. thanks!
one way can if fit gaussians data , take max assuming each data point equal gaussian @ point.
this can done follows:
- fit gaussian g1 dataset x1 , gaussian g2 dataset x2, mean of g1 less mean of g2.
- then, find intersection point arithmetic.
- then, values of x less intersection take x1 , values of x greater intersection take x2.
Comments
Post a Comment