今天看D.M.J. Tax的Data description toolbox (dd_tool)手册,里面有一段简单的测试代码:
x=oc_set(gendatb([50,10]),'1') scatterd(x,'legend') w=svdd(target_class(x),0.1,8) plotc(w) w=svdd(x,0.1,8) plotc(w)
x=oc_set(gendatb([500,100]),'1') scatterd(x,'legend') % svdd mapping % FRACREJ:弃真(第I类)错误10% % SIGMA:8 w=svdd(x,0.1,8) plotc(w,'r*') % FRACREJ:弃真(第I类)错误10% % SIGMA:4 w=svdd(x,0.1,4) plotc(w,'r--') % gauss mapping % FRACREJ:弃真(第I类)错误10% w=gauss_dd(x,0.1) plotc(w,'b--')
结果图: