LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > Homework 8

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-03-2012, 04:40 AM
itooam itooam is offline
Senior Member
 
Join Date: Jul 2012
Posts: 100
Default Should SVMs ALWAYS converge to the same solution given the same data?

Should SVMs ALWAYS converge to the same solution given the same data?

I've been running a few tests on Q7 and I find that if I randomize the order of the data in both the training and test sets, I get different solutions/errors? I am now wondering whether I should be averaging over say a hundred runs and whether I need to go back to previous questions and do the same where necessary? Argh (if so)!? Please can somebody confirm? Maybe my "shuffling" code is incorrect but looks correct to me:

Code:
trainingData = ReadCaltechFile('features.train');

%randomize data:
[dummy,ix] = sort(rand(1,rows(trainingData))); 
newData = trainingData(ix,:);
trainingData = newData; 

y = double(trainingData(:, 1));
X = double(trainingData(:, 2:end));
...and similar for test data.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:14 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.