Username Remember Me?
Password   forgot password?
   
   
SVDD
Posted: 12 August 2010 10:49 AM   [ Ignore ]  
Member
RankRankRank
Total Posts:  68
Joined  2010-04-27

Hello,

The PRSD Studio toolbox contains spd_svdd. However this will only create a pipeline executing a one-class classification. Amazingly I could not find something like sdsvdd which would train a one-class classifier. Is there any solution to train a support vector data descriptor?

regards,

JM

Profile
 
 
Posted: 18 August 2010 04:53 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  240
Joined  2008-04-26

Dear Jean-Michel,

you may train SVDD one-class classifier in DD_Tools with the svdd command. Then you may convert the resulting mapping into a pipeline using sdconvert.

For the conversion you will need a patch - just copy the attached file below to the prsd_toolbox/@sdppl directory.

With Kind Regards,

Pavel

File Attachments
conv_prtools.p  (File Size: 3KB - Downloads: 105)
Profile
 
 
Posted: 06 September 2010 04:15 PM   [ Ignore ]   [ # 2 ]  
Member
RankRankRank
Total Posts:  68
Joined  2010-04-27

Hi Pavel,

Bad news: it seems that sdconvert does not recognize incsvdd, even with the new version of conv_prtools

>> w
AUC optim
classifier10 to 2 trained  mapping   --> incsvdd
>>sdconvert(w)
??? 
Error using ==> process at 332
unknown mapping 
'incsvdd'

Error in ==> /matlab/PRSD_Studio/prsd_toolbox/@sdppl/conv_prtools.p>conv_prtools at 12


Error in 
==> /matlab/PRSD_Studio/prsd_toolbox/@sdppl/sdppl.p>sdppl at 44


Error in 
==> /matlab/PRSD_Studio/prsd_toolbox/sdconvert.p>sdconvert at 97

regards,

JM

Profile
 
 
Posted: 07 September 2010 09:11 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  240
Joined  2008-04-26

Dear Jean-Michel,

incsvdd was never supported. But looking inside the trained mapping, it seems very similar to svdd. So the good news is, that we added support for incremental SVDD :-)

I’m attaching updated conv_prtools.p that with invsvdd support (add it to prsd_toolbox/@sdppl directory)

>> a
'Fruit set' 260 by 2 sddata3 classes'apple'(100'banana'(100'stone'(60
>> 
a2=sdrelab(a,{1:'fruit'})
  
1apple  -> fruit 
  2
banana -> fruit 
  3
stone  -> stone
'Fruit set' 260 by 2 sddata2 classes'stone'(60'fruit'(200)

>> 
b=dataset(a2)
260 by 2 dataset with 2 classes[200   60]
>> c=oc_set(b,'fruit')
 (
targetclfruit), 260 by 2 dataset with 2 classes[60  200]

>> w2=incsvdd(c,0.1,'r',2)
IncSVDD (r=2.00), 2 to 2 trained  mapping   --> incsvdd

>> p=sdconvert(w2)
IncSVDD (r=2.00pipeline 2x1   (sdp_svdd)

Here is an example how to set an appropriate threshold using ROC:

>> out=a2*p
'Fruit set' 260 by 1 sddata2 classes'stone'(60'fruit'(200

>> 
r=sdroc(out,'target','fruit')
  
1stone  -> non-fruit
  2
fruit  -> fruit
ROC 
(255 thr-based op.points3 measures), curop60
est
1:err(fruit)=0.012:err(non-fruit)=0.053:mean-error=0.03

>> sdscatter(a,p*r,'roc',r)

With Kind Regards,

Pavel

[ Edited: 07 September 2010 09:13 AM by pavel]
Image Attachments
incsvdd_roc.jpg
File Attachments
conv_prtools.p  (File Size: 3KB - Downloads: 96)
Profile
 
 
Posted: 07 September 2010 10:01 AM   [ Ignore ]   [ # 4 ]  
Member
RankRankRank
Total Posts:  68
Joined  2010-04-27

Hi Pavel,

Thank you it works fine. The only small difference I could notice rely in the name of the pipeline.

>> w2=incsvdd(c,0.1,'r',2)
2 to 2 trained  mapping   --> incsvdd
>> p=sdconvert(w2)
 
pipeline               2x1   (sdp_svdd)

But this is just a detail I think.

Thanks you for your support.

Best regards,

Jean-Michel

Profile