how to Calculate SSE for 20 center
1 view (last 30 days)
Show older comments
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 Comments
Image Analyst
on 17 Apr 2017
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?
Answers (0)
See Also
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!