Find the "peak" of the dataset

I have a dataset for which I would like to find the average peak. I did some testing at Numbers.app to see what I need, and if I make a dataset chart, it has a function that it calls a “polynomial trend line” that draws a data curve, and the peak of this curve looks exactly like this same as the point / value i got after.

So, how could I programmatically calculate this curve and find the tangent on the curve?

I searched Wikipedia and found topics like "Normal Distribution" and "Polynomial Regression" that seemed very related, but it was always difficult for me to follow the equations on Wikipedia, so I hope that maybe someone here can give me a software example.

Here are some diagrams to illustrate what I need. Green dots are data points, and the blue line is the “polynomial trend line” (about 6). The “peak” of this trend line is what I need.

Example with even datasetExample with uneven dataset

Updated question:

After some answers, I understand that my question needs to be rephrased, since the problem is not how to find the peak of the curve, but how to generate this blue curve from green dots so that I can find where the “weight” lies in the dataset . The goal is to get a kind of "average maximum."

I think one more question: "What is this specific problem ?;)

+3
source share
6 answers

, .

, , , . , .

bezier-spline LOESS, "" , .

, , .

+4

, -, , , µ σ, (. wiki ).

, , µ.

+1

/. .

, . .

, - - , , .

+1
0

, Y X. Y, X. Y (X1) Y X = X1.

max = 0. Y X. Y (X1) > max, max = Y (X). Ys, , , Y.

, . , ? , . ? , .

0

"R", , . , , ( "" ), - .

50 , , ( , ). " ", ...   x < -dataset $x ## , , [, 1]   y < -dataset $y ## , , [, 2]   k = 2 ## , , 3    (k < 100) {    = + 1    = ( ~ (, , = TRUE))    [] = () $   }    ()

11 . ANOVA , .

"lm" .    = ( ~ (, 11, = TRUE))   fit.coef < - c ( (fit) $ [1,1], () $ [2,1],...   fit.poly < - (fit.coef)

:

fit.deriv <- deriv(fit.poly)

x (max) .

...

fit.slope <- predict(fit.deriv,x) ## x here represents all the x values above.  For a single value you can just replace x with the value of x representing the max value in your polynomial

, , , !

.

0

Source: https://habr.com/ru/post/1760288/


All Articles