tag:blogger.com,1999:blog-4925159124120434624.post8090740604235466724..comments2020-06-02T12:42:54.302+05:30Comments on APDaga DumpBox : The Thirst for Learning...: Coursera: Machine Learning (Week 7) [Assignment Solution] - Andrew NGAkshay Daga (APDaga)http://www.blogger.com/profile/04899846959607912677noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-4925159124120434624.post-37984689624144150192020-05-25T11:34:05.576+05:302020-05-25T11:34:05.576+05:30Yes. In MATLAB, matrix has capability to update. i...Yes. In MATLAB, matrix has capability to update. i.e You can change the size of Matrix after initializing it. BUT, If you keep on updating/changing the size of matrix in each iteration, you will get the warning and you code will be slower (not optimized). <br />So, It is always advised to initialize the matrix with it final size (if known) and then only update the values on the matrix not the size.Akshay Daga (APDaga)https://www.blogger.com/profile/04899846959607912677noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-63548359761134809382020-05-25T05:13:08.589+05:302020-05-25T05:13:08.589+05:30Well, after posting the comment, I tried to invest...Well, after posting the comment, I tried to investigate further. It does not matter what size you give for result<br />1) you can initialize with size(64,3)<br />2) Even though the size is (16,3) , you can still add more rows like 17 onward.<br /><br />Hope it helps<br />Anonymoushttps://www.blogger.com/profile/09232564490585964356noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-4365955881526712602020-05-25T05:05:45.164+05:302020-05-25T05:05:45.164+05:30I have the same question, would be helpful if you ...I have the same question, would be helpful if you could answer thisAnonymoushttps://www.blogger.com/profile/09232564490585964356noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-78313518709935747042020-04-21T14:18:40.537+05:302020-04-21T14:18:40.537+05:30Thanks for the feedback. You might be correct.
Co...Thanks for the feedback. You might be correct. <br />Coursera keep on updating their assignments time to time.<br />All my answers belongs to the time I was doing it. and these were 100% correct answers by then.Akshay Daga (APDaga)https://www.blogger.com/profile/04899846959607912677noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-78409433056920599202020-04-21T12:51:30.645+05:302020-04-21T12:51:30.645+05:30Your code for dataset3param gives c =0.1and sigma ...Your code for dataset3param gives c =0.1and sigma =0.1 which is not correct. Correct value for c and sigma is 0.3 and 0.1 respectively. Anonymoushttps://www.blogger.com/profile/15683764241925866413noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-64447668529691004722020-04-13T21:22:50.616+05:302020-04-13T21:22:50.616+05:30In this line of code:
coderesult = zeros(length(C_...In this line of code:<br />coderesult = zeros(length(C_list)+length(sigma_list),3)<br />you would get a 16x3 matrix since both arrays are 8 units long. <br />However, wouldn't you need a 64x3 matrix since we need to try out each possibility in C_list and sigma_list, which would mean trying out 64 different permutations?<br /><br />Anonymoushttps://www.blogger.com/profile/08753745972061105353noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-52283915050893290862020-04-09T16:49:16.999+05:302020-04-09T16:49:16.999+05:30Hi Alankar,
First of all, These are not Errors, Th...Hi Alankar,<br />First of all, These are not Errors, These are warnings.<br />You might have made some silly mistakes in your code. <br />I feel you haven't understood the code I have provided above. Please try to understand that and then write you logic. <br />Don't just copy paste blindly.Akshay Daga (APDaga)https://www.blogger.com/profile/04899846959607912677noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-55958715299460076602020-04-07T19:53:56.561+05:302020-04-07T19:53:56.561+05:30All the above errors mentioned are in the processe...All the above errors mentioned are in the processemail part only .Alankar Mishrahttps://www.blogger.com/profile/02851939079346861788noreply@blogger.comtag:blogger.com,1999:blog-4925159124120434624.post-2537455773349808822020-04-07T19:51:49.774+05:302020-04-07T19:51:49.774+05:30processEmail code is not running in matlab , it is...processEmail code is not running in matlab , it is showing the following error in the command prompt : !! Submission failed: unexpected error: Error using fprintf<br />Function is not defined for 'cell' inputs.<br />Error from file:/MATLAB Drive/machine-learning-ex/ex6/processEmail.m<br /><br />This is line 114 :<br /> fprintf('%s ', str);<br />How to resolve it .<br /><br />And , error 2 is<br />catch str = ''; continue;<br />in the above line it is telling variable assigned to variable "str" might be unused .<br />Function:processEmail<br />On line:114<br /><br />And third error is :<br /> word_indices = {word_indices; index};<br />In the above line it is telling variable "word_indices" tend to change size on every loop iteration . Consider preallocating for speed .Alankar Mishrahttps://www.blogger.com/profile/02851939079346861788noreply@blogger.com