Let’s say I have a dataset that contains x y values of a function such as sin(x) and a range. How do I detect the curves in this dataset (the peaks and troughs of the sin function in this)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A solution I figured out yesterday: Use a sliding window (I use a 5th of my dataset size) over the data, and vote for the local minima and maxima, when the window has been slid over the data the most votes tend to be the centre of the curves. For further processing, once I had this data I would threshold the points to water it down to a few strong points, and then perform polynomial regression (to 3 degrees), take the a value (in ax^2+bx+c) to determine the size of the curve (if it is too flat then just consider it a straight line with an anomaly).
I’d like to add that I may not have described the problem accurately, when I said sin(x) I was using an example that generated curves, my data will in no way follow a trigonomic function (or any function), and the curves will be at random places making regression inaccurate.
This may not be the perfect solution but it does work.