Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SHOGUN使ってみました

第1回:はじめてのSHOGUN編

  • Login to see the comments

SHOGUN使ってみました

  1. 1. SHOGUN 2011 4 23 9 CV PRML @yasutomo57jp ( @inco_san )
  2. 2. SHOGUN 1 SHOGUN 2011 4 23 9 CV PRML @yasutomo57jp ( @inco_san )
  3. 3. SHOGUN
  4. 4. *OpenCV * http://d.hatena.ne.jp/takmin/20110306/1299423617
  5. 5. • SHOGUN
  6. 6. • SHOGUN• 1 SHOGUN
  7. 7. • SHOGUN• 1 SHOGUN • Static Interface
  8. 8. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN
  9. 9. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface
  10. 10. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( )
  11. 11. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( ) • libshogun
  12. 12. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( ) • libshogun
  13. 13. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( ) • libshogun
  14. 14. SHOGUN
  15. 15. SHOGUN•
  16. 16. SHOGUN• • SVM !
  17. 17. SHOGUN• • SVM ! • SVM OCAS, Liblinear, LibSVM, SVMLight, SVMLin, GPDT
  18. 18. SHOGUN• • SVM ! • SVM OCAS, Liblinear, LibSVM, SVMLight, SVMLin, GPDT • Linear, Polynomial, Gaussian and Sigmoid Kernel
  19. 19. SHOGUN• • SVM ! • SVM OCAS, Liblinear, LibSVM, SVMLight, SVMLin, GPDT • Linear, Polynomial, Gaussian and Sigmoid Kernel •
  20. 20. SHOGUN• SVM !! • LDA : Linear Discriminant Analysis • LPM : Linear Programming Machine • (Kernel) Perceptron • HMM
  21. 21. SHOGUN••
  22. 22. SHOGUN
  23. 23. Q. Matlab
  24. 24. Q. Matlab
  25. 25. Octave
  26. 26. Python
  27. 27. Python
  28. 28. Q. C++ …
  29. 29.
  30. 30.
  31. 31. SHOGUN
  32. 32. SHOGUN
  33. 33. • Static Interface • •• Modular Interface • Python Octave •• libshogun • C++ •
  34. 34. • Static Interface • •• Modular Interface • Python Octave •• libshogun • C++ •
  35. 35. WindowsCygwinhttp://www.shogun-toolbox.org/#releases
  36. 36. Windows Linux (Ubuntu)Cygwin sudo apt-get install shogunhttp://www.shogun-toolbox.org/#releases
  37. 37. Windows Linux (Ubuntu)Cygwin sudo apt-get install shogunhttp://www.shogun-toolbox.org/#releases Macsudo port install shogun
  38. 38. Windows Linux (Ubuntu)Cygwin sudo apt-get install shogunhttp://www.shogun-toolbox.org/#releases Macsudo port install shogun OK
  39. 39. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  40. 40. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  41. 41. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  42. 42. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  43. 43. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  44. 44. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  45. 45. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  46. 46. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  47. 47. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  48. 48. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  49. 49. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify out.txt
  50. 50. •• libsvm (Cmdline )set_kernel SIGMOID REAL 50 3 0 (cache, gamma, coeff)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify out.txt
  51. 51. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  52. 52. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  53. 53. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  54. 54. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  55. 55. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  56. 56. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  57. 57. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  58. 58. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  59. 59. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  60. 60. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  61. 61. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify out.txt
  62. 62. Python• sg ( from sg import sg ) • sg OK • Cmdline set_feature TEST data.dat • Python sg(‘set_feature’, ‘TEST’, ‘data.dat’) http://www.shogun-toolbox.org/doc/static_tutorial.html
  63. 63. • SHOGUN
  64. 64. • SHOGUN•3
  65. 65. • SHOGUN•3 • Static Interface,Modular Interface, libshogun
  66. 66. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface
  67. 67. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface•
  68. 68. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface•
  69. 69. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface• Modular Interface

×