linux - Fitting multiple curves to one data set -


i have data set receive outside source, , have no real control over. can edit ad infinitum, cannot choose parameters filter set. data, when plotted, shows 2 clumps of points several sparse, irrelevant points, well. here sample plot:

raw plot

(sorry, don't have adequate privileges embed picture)

there clump of points on left, clustered around (1, 16). clump part of set of points lies on (or near) line stretching (1, 17.5) (2.4, 13). also, there apparent curve (1.75, 18) (2.75, 12.5). finally, there sparse points above second curve, around (2.5, 17). visually, it's not difficult separate these groups of points. however, need separate these points within data file 3 groups, i'll call line, curve, , other (the curve group 1 need). i'd write program can reasonably without needing visually see plot.

now, i'm going add couple items make worse. sample set of data. while shapes of curve , line relatively constant 1 data set next, positions not. these regions can (and do) shift, both horizontally , vertically. real constant there's negative-slope line top-left bottom-right of plot, ~$\frac{1}{x^4}$ curve top-center bottom-right, , of sparse points in top-right corner, above curve.

i'm on linux, , i'm out of ideas. can tell approaches i've tried, though have not done well.

  • first, cleaned data set , sorted in ascending order x-coordinate. thought maybe points sorted in sort of logical way allow me 'head' or 'tail' data achieve desired result, not case.
  • i can write code in (python, fortran, c, etc.) removes point if it's not within x distance of previous point. fine, except scattering of points such 2 points near each other in x, separated appreciable distance in y. doesn't line , curve draw near 1 larger x-values.
  • i can fit curve partial data set. when sort data x-coordinate, example, can choose plot first 30 points, or last 200, or set of 40 in middle somewhere. that's not problem. line points tuck underneath curve points, causes problem.
  • if line points constant (which they're not), rotate plot angle line vertical , can @ points right of line, rotate back. may best way go doing this, in order that, need able isolate linear points, more or less essence of problem.

the other idea seems plausible me, try identify point density , split data separate files parameters. think best candidate problem, since independent of point location. however, i'm not sure how go doing this, because line , curve come quite close larger x-values (in sample plot, it's x-values greater 2).

i know not fall in request of mwe, don't know how i'd go providing more classical mwe. if there's else can provide help, please ask. thank in advance.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -