歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> dd_tool一類分類的簡單測試

dd_tool一類分類的簡單測試

日期:2017/3/1 10:08:14   编辑:Linux編程

今天看D.M.J. Tax的Data description toolbox (dd_tool)手冊,裡面有一段簡單的測試代碼:

  1. x=oc_set(gendatb([50,10]),'1')
  2. scatterd(x,'legend')
  3. w=svdd(target_class(x),0.1,8)
  4. plotc(w)
  5. w=svdd(x,0.1,8)
  6. plotc(w)

一開始會出現上篇《PRtools模式識別工具箱關於version運行出錯》 問題,得以解決。

最終運行圖像如下:

  1. x=oc_set(gendatb([500,100]),'1')
  2. scatterd(x,'legend')
  3. % svdd mapping
  4. % FRACREJ:棄真(第I類)錯誤10%
  5. % SIGMA:8
  6. w=svdd(x,0.1,8)
  7. plotc(w,'r*')
  8. % FRACREJ:棄真(第I類)錯誤10%
  9. % SIGMA:4
  10. w=svdd(x,0.1,4)
  11. plotc(w,'r--')
  12. % gauss mapping
  13. % FRACREJ:棄真(第I類)錯誤10%
  14. w=gauss_dd(x,0.1)
  15. plotc(w,'b--')

結果圖:

Copyright © Linux教程網 All Rights Reserved