フィルターのクリア

Find the best fit 2 piecewise polynomial function for a data set with 1 optimal breakpoint location

3 ビュー (過去 30 日間)
I have a 2D data set (2 variables x and y). I would like to use 2 piecewise polynomial functions with 1 breakpoint to best fit the dataset.
For example, function 1 = polynomial1 for mini_data < t < a and function 2 = polynomial2 for a<t<max_data. Also, I need to find the optimal breakpoint a value.
What maths tool/algorithm should I use, please?
Thanks in advance!
  3 件のコメント
Yutao Wang
Yutao Wang 2021 年 5 月 25 日
編集済み: Yutao Wang 2021 年 5 月 25 日
Thanks, @Torsten.
Any degree of polynomial is fine, perhaps degree = 2 to 6 is preferred.
At breapoint, it needs to be continuous + continuity of the first derivative. An example of the data is given here. Thanks in advance!
Torsten
Torsten 2021 年 5 月 26 日
編集済み: Torsten 2021 年 5 月 26 日
min: sum_{i=1}^{i=ndata} (p(xdata(i),a) - ydata(i))^2
subject to
p1(a,a) = p2(a,a)
p1'(a,a) = p2'(a,a)
xdata(1) <= a <= xdata(ndata)
with
p(x,a) = p1(x,a) for x<=a
p(x,a) = p2(x,a) for x>=a
Parameters to be optimized are a and the coefficients of the polynomials p1 and p2.
A typical application for Matlab's "fmincon".

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by