svm_lightning.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. Support Vector Machines
  2. (lightning talk)
  3. (LPW '07) (john melesky)
  4. ---
  5. Presupposing:
  6. <ul>
  7. <li>You have a bunch of something.</li>
  8. <li>You can transform relevant attributes of those things into numbers.</li>
  9. <li>You can connect those numbers into vectors (think coordinates in an attribute space).</li>
  10. <li>You want to categorise them base on those numbers.</li>
  11. </ul>
  12. ---
  13. The problem: find a line that separates these two categories of thing
  14. <img style="float: right;" src="basedata.png" />
  15. ---
  16. For humans, this is easy.
  17. <img style="float: right;" src="cleansep.png" />
  18. For mathematicians, it's actually not too hard.
  19. ---
  20. For humans, this is easy.
  21. <img style="float: right;" src="cleansep.png" />
  22. For <del>mathematicians</del> computers, it's actually not too hard.
  23. ---
  24. There are two problems, though.
  25. ---
  26. Problem, the first:
  27. <img style="float: right;" src="badline1.png" />
  28. ---
  29. Problem, the first:
  30. <img style="float: right;" src="badline2.png" />
  31. ---
  32. Problem, the second:
  33. <img style="float: right;" src="badset1.png" />
  34. ---
  35. Problem, the second:
  36. <img style="float: right;" src="badset2.png" />
  37. ---
  38. Problem, the second:
  39. <img style="float: right;" src="badset3.png" />
  40. ---
  41. Conveniently, Support Vector Machines address both of the problems i've identified.
  42. ---
  43. Solution, the first:
  44. ---
  45. Solution, the first:
  46. <img style="float: right;" src="bordervectors.png" />
  47. <ul>
  48. <li>Create "border" vectors, parallel to eachother, touching the outermost edge of each category dataset.</li>
  49. </ul>
  50. ---
  51. Solution, the first:
  52. <img style="float: right;" src="bordervectors.png" />
  53. <ul>
  54. <li>Create "border" vectors, parallel to eachother, touching the outermost edge of each category dataset.</li>
  55. <li>As you add new items, ensure these "borders" stay parallel.</li>
  56. </ul>
  57. ---
  58. Solution, the first:
  59. <img style="float: right;" src="supportvectors.png" />
  60. <ul>
  61. <li>Create "border" vectors, parallel to eachother, touching the outermost edge of each category dataset.</li>
  62. <li>As you add new items, ensure these "borders" stay parallel.</li>
  63. <li>Create your categorizing vector equidistant from your two "borders".</li>
  64. </ul>
  65. ---
  66. Solution, the first:
  67. <img style="float: right;" src="supportvectors.png" />
  68. <ul>
  69. <li>Create "border" vectors, parallel to eachother, touching the outermost edge of each category dataset.</li>
  70. <li>As you add new items, ensure these "borders" stay parallel.</li>
  71. <li>Create your categorizing vector equidistant from your two "borders".</li>
  72. <li>These "borders" are called "support vectors".</li>
  73. </ul>
  74. ---
  75. A joke:
  76. Q: How many mathematicians does it take to change a lightbulb?
  77. ---
  78. A joke:
  79. Q: How many mathematicians does it take to change a lightbulb?
  80. A: One, who hands it to 127 Londoners, thus reducing it to an earlier joke.
  81. ---
  82. A question:
  83. Q: How do mathematicians categorize non-linearly-separable data?
  84. ---
  85. A question:
  86. Q: How do mathematicians categorize non-linearly-separable data?
  87. A: Munge the data until it's linearly separable, thus reducing it to an earlier slide.
  88. ---
  89. A question:
  90. Q: How do mathematicians categorize non-linearly-separable data?
  91. A: Munge the data until it's linearly separable, thus reducing it to an earlier slide.
  92. Seriously. The munging is done using what are known as "kernel methods".
  93. ---
  94. Kernel Methods
  95. <ul>
  96. <li>Functions that munge data</li>
  97. <li>Very faintly magical (because i have no idea how they were derived)</li>
  98. <li>Require some skill to choose the right one for the problem</li>
  99. <ul>
  100. ---
  101. Kernel Methods + Support Vectors = Support Vector Machines
  102. ---
  103. In Perl:
  104. Algorithm::SVM - bindings to libsvm
  105. (Also wrapped by AI::Categorizer)