フィルターのクリア

Weighted Least Square Regression

3 ビュー (過去 30 日間)
Raziur Rahman
Raziur Rahman 2015 年 6 月 5 日
回答済み: Star Strider 2015 年 6 月 6 日
I have a x matrix with 5 columns and Y matrix with one column of values. I want to minimize this function for all observations:sum(y-sum(alpha*x))^2. Which function can do this thing? I want to have the values of alpha and sum of alpha will be one.

回答 (1 件)

Star Strider
Star Strider 2015 年 6 月 6 日
I don’t understand your equation. Weighted least squares requires:
WSSCF = sum(w.*(y-f(x)).^2); % Weighted Least Squares Cost Function
where ‘w’ is the vector of weights, and f(x) is actually a function of ‘x’ that maps ‘x’ to ‘y’. (This is schematic only. The actual function f(b,x) is a function of the parameters ‘b’ as well.
There are several linear and nonlinear parameter estimation functions that can do what you want, but the one you use depends on the nature of your data, the toolboxes you have available, and the model you want to use to fit it.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by