Re: [問題] Homework 3-3

看板CS_SLT2005作者 (研二不是應該很清閒嗎?)時間20年前 (2005/10/12 08:27), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串3/3 (看更多)
※ 引述《mengjia (try it)》之銘言: : ※ 引述《hometoofar (家太遠了)》之銘言: : : I tried to do the primal with slack variables starting by using the 4 points : : to get 4 equations of w1, w2, b and the slack variable. : : I did some algebra to reduce the equations but I can't get anything that's : : really helpful. However I did notice something interesting.. : : If I just add the 4 equations, it shows that sum of the 4 slack variable >= 4 : : Then I just throw in w1=0, w2=0 and hope to find some b that works with the : : slack variable constraint. A value of b exists so that w1=0 and w2=0 and sum : : of slack variable = 4. I believe that it minimizes the equation.. but there : : are two things I am concering about... : : 1. This is not a good mathematical way... I can't just random pick some number : : and claim it to be the optimal. : : 2. What line does w=[0 0]T give? I know that this dataset is not linearly : : separatable unless I have a >1 slack variable for one of the o or x point, : : but I can at least draw such a line. The idea of w=[0 0]T doesn't make me : : feel right. : I think of solving the primal "without" slack variables. : If using slack variables, we can't match the dual. : (Of course, I first assume no advanced dual solution exists.) : Because the example is not separable, the primal is not solvable. I don't think so. if we add a penalty term, the primal should be solvable. I think the mengjia's solution may be correct. this is the only way I can get a solution. : : Also I am stuck on dual too... : : I get the alpha equation, but I don't know how to find the values of alphas. : : I get the equation, I get the constraint that yTa = 0, but there are 4 : : unknown alphas.. : : Again, I try to make everything 0, simple, but I know it isn't good. : : (Like the page 23 example of lecture notes, set alpha1=0 meet the constraints, : : but it's not the right solution) : : I tried to find another set of alpha that aren't all 0 and minimize the : : equation, but that set gives me really big w... : For dual, I can compute alpha. I just say it needs a trick,too. = =+ : Alpha is a zero column. I also get the sol of alpha, but I don't use any special trick!! @_@ Just an algebra computation and I get a different sol with yours. but my sol could match the primal-dual relationship. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.25.136 ※ 編輯: Evenroll 來自: 140.112.25.136 (10/12 08:32)

10/12 12:27, , 1F
it's my wrong ... orz
10/12 12:27, 1F

10/12 16:31, , 2F
I am stuck on how to get a "number" for alpha....
10/12 16:31, 2F
文章代碼(AID): #13J5X-Dp (CS_SLT2005)
討論串 (同標題文章)
文章代碼(AID): #13J5X-Dp (CS_SLT2005)