how to Calculate SSE for 20 center

3 ビュー (過去 30 日間)
shawin
shawin 2017 年 4 月 17 日
コメント済み: Image Analyst 2017 年 4 月 17 日
I have the function bellow:
function y=ObjSSE(x1)
global Dim Data
for i=1:size(x1,1)
c=reshape(x1(i,:),[Dim size(x1,2)/Dim]);
d=dist(Data,c);
d=min(d');
y(i)=sum(d(:));
end
if i x1 = 3.8846 1.9915
2.8583 1.1652
x2 = 5.0831 0.4157
4.1981 1.1693
x3= 3.9004 1.3658
5.1233 0.6420
..... till x10
how can I loop and calculate for x values which are from 1 to 10 and calculate y
ten times and choose the minimum y
  2 件のコメント
Jan
Jan 2017 年 4 月 17 日
The question is not clear.
Image Analyst
Image Analyst 2017 年 4 月 17 日
What is SSE? Sum of Squared Errors? I see no squaring going on. x1 is passed in, so we know what that is, but what are x2,x3, ... x10? Is that "if i" statement supposed to be part of the function's code? What are the values of "Dim" and "Data"? Where is your code for the dist() function?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by