## P1

Moderator: Statistisches Maschinelles Lernen

linmen
Mausschubser
Beiträge: 65
Registriert: 1. Mai 2006 11:40

### P1

i'm not quite sure about the setting of b.

linmen
Mausschubser
Beiträge: 65
Registriert: 1. Mai 2006 11:40

### Re: P1

do i need perceptron algorithm to determine b?

sroth
Dozentin/Dozent
Beiträge: 37
Registriert: 20. Sep 2007 15:00

### Re: P1

No, in problem 1 the value of b needs to come out of the quadratic optimization (remember that you optimize over w and b).

(Sorry for the late reply, but as you know I am away at a conference)

linmen
Mausschubser
Beiträge: 65
Registriert: 1. Mai 2006 11:40

### Re: P1

thanks. I'm done with that.
but i got another question about task B. my f contains the information about xi and C, and xi is set to be a vector of value 0, 1 , 2, generated randomly by rand function. after the execution of quadprog, i took C as 0 and 200 separately, but the corresponding figures are totally the same. i first tried to group the term c*sum(xi_i) as an entry of f, it didn't help. then i tried to retrieve the value of xi respectively, it didn't help, neither.

sroth
Dozentin/Dozent
Beiträge: 37
Registriert: 20. Sep 2007 15:00

### Re: P1

You shouldn't use random xi's, but they should rather be determined by the optimization. So you need to make sure that they are used as part of the optimization (i.e. they need to be minimized over as well) and then you should see the setting of C change the result. Is that what you are doing now?

linmen
Mausschubser
Beiträge: 65
Registriert: 1. Mai 2006 11:40

### Re: P1

if the xi is part of the optimization,i was unable to force xi_i nonnegative without restricting the w and b to be nonnegative.

linmen
Mausschubser
Beiträge: 65
Registriert: 1. Mai 2006 11:40

### Re: P1

i'm done with it by letting w and b be greater than -inf. Thanks a lot!

linmen
Mausschubser
Beiträge: 65
Registriert: 1. Mai 2006 11:40