how to Calculate SSE for 20 center
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
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 Exchange 中查找有关 Operators and Elementary Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!