Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Diagnosing Cancer with Machine Learning

Diagnosing Cancer with Machine Learning

Computational intelligence is the art of building artificial intelligence with software. We’ve all reached for metaphors and stories to explain and model difficult concepts in OOP. Join me on a journey through some of the metaphors used to achieve intelligent behaviour. We will explore the inner workings of a neural network and a training algorithm, and show how to build a classifier to predict a cancer diagnosis with high accuracy. Lastly we'll discuss a non-deterministic way of thinking about software, and what the impact could be for what we believe are intelligent machines.

Checkout the demo here: https://intelligence-rubyfuza2015.herokuapp.com/

Simon van Dyk

February 06, 2015
Tweet

More Decks by Simon van Dyk

Other Decks in Programming

Transcript

  1. M A C H I N E L E A

    R N I N G D I A G N O S E C A N C E R H O W T O W I T H A N D S H O W T H A T I T I S C O O L A N D A C C E S S I B L E T O A N Y D E V E L O P E R ~ S I M O N VA N D Y K
  2. C h a r l e s B a b

    b a g e L E G E N D
  3. A D A L O V E L A C

    E L E G E N D
  4. M O D E L S W H aT A

    r e ? C o m p u t e r D e s k t o p s e r v e r w i n d o w s C l i p b o a r d F i l e f o l d e r
  5. A r t i f i c i a l

    N e u r a l N e t w o r k T h e
  6. C o n s i d e r t h

    e n e u r o n ~ 1 0 b i l l i o n E x c i t e d / i n h i b i t e d e l a s t i c
  7. “a p p r o x i m at e

    t h e g e n e r a l i s at i o n o f k n o w l e d g e a n d d i s c o v e r y — t h e y l e a r n ”
  8. A . t u r i n G o n

    l e a r n i n g
  9. “ I n s t e a d o f

    t r y i n g t o p r o d u c e a p r o g r a m t o s i m u l at e t h e a d u lt m i n d , w h y n o t r at h e r t r y t o p r o d u c e o n e w h i c h s i m u l at e s t h e c h i l d ’ s . I f t h i s w e r e t h e n s u b j e c t e d t o a n a p p r o p r i at e c o u r s e o f e d u c at i o n o n e w o u l d o b ta i n t h e a d u lt m i n d . ” ~ A . T u r i n g
  10. p e r c e p t r o n

    f ( n e t ) n e t = 0 . 1 * 0 . 9 + 0 . 7 * 0 . 4 + 1 . 3 * 0 . 6 0 . 7 0 . 1 1 . 3 I n p u t s 0 . 9 0 . 4 0 . 6 W e i g h t s 0 . 8 5 o u t p u t ?
  11. p e r c e p t r o n

    f ( n e t ) n e t = v 1 * w 1 + v 2 * w 2 + v 3 * w 3 v 2 v 1 v 3 I n p u t s w 1 w 2 w 3 W e i g h t s o u t o u t p u t
  12. o u t = F ( n e t )

    n e t = v 1 * w 1 + v 2 * w 2 + v 3 * w 3 SIgmoid 0 . 0 0 . 5 1 . 0 0 . 8 5
  13. o u t = F ( n e t )

    STEP 0 . 0 0 . 5 1 . 0 0 . 8 5
  14. e x a m p l e : o r

    v1 v2 target 0 0 0 0 1 1 1 0 1 1 1 1 v 1 v 2 w 1 w 2 o u t g u e s s t h e w e i g h t s
  15. e x a m p l e : o r

    v1 v2 target 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0 0 n e t = 0 n e t = v 1 .w 1 + v 2 .w 2 ( w 1 ) ( w 2 ) 0 w e ’ r e g o o d !
  16. v1 v2 target 0 0 0 0 1 1 1

    0 1 1 1 1 e x a m p l e : o r 0 1 0 0 n e t = v 1 .w 1 + v 2 .w 2 ( w 1 ) ( w 2 ) 0 n e t = 0
  17. v1 v2 target 0 0 0 0 1 1 1

    0 1 1 1 1 e x a m p l e : o r 0 1 0 1 n e t = v 1 .w 1 + v 2 .w 2 ( w 1 ) ( w 2 ) 1 n e t = 1 w e ’ r e g o o d !
  18. v1 v2 target 0 0 0 0 1 1 1

    0 1 1 1 1 e x a m p l e : o r 1 0 0 1 n e t = v 1 .w 1 + v 2 .w 2 ( w 1 ) ( w 2 ) 0 n e t = 0
  19. v1 v2 target 0 0 0 0 1 1 1

    0 1 1 1 1 e x a m p l e : o r 1 0 1 1 n e t = v 1 .w 1 + v 2 .w 2 ( w 1 ) ( w 2 ) 1 n e t = 1 w e ’ r e g o o d !
  20. v1 v2 target 0 0 0 0 1 1 1

    0 1 1 1 1 e x a m p l e : o r 1 1 1 1 n e t = v 1 .w 1 + v 2 .w 2 w e ’ r e g o o d ! ( w 1 ) ( w 2 ) 1 n e t = 2
  21. v1 v2 target 0 0 0 0 1 1 1

    0 1 1 1 1 o r x o r v1 v2 target 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1
  22. C o m p o s e t h e

    m v 1 v 2 v 3 P e r c e p t r o n s i n p u t s o u t p u t f f f
  23. d i a g n o s i n g

    c a n c e r f o r r e a l s
  24. cell radius … texture DIAGNOsis 1.23 … 4.56 Malignant …

    … … … 0.41 … 2.3 Benign c l a s s i f i c at i o n d ata J a m e s S a r a h j e f f at t r i b u t e s
  25. A t t r i b u t e s

    a r e c o m p u t e d f r o m a d i g i t i z e d i m a g e o f a f i n e n e e d l e a s p i r at e ( F N A ) o f a b r e a s t m a s s .
  26. t r a i n i n g 17.99 10.38

    … 1.78 M ta r g e t o u t p u t M 1.34 0.8 … 1.8 B B 2.7 4.o2 … 2.5 M B 6.52 1.33 … 5.91 B B 7 5 %
  27. e va l u at i o n M o

    u t p u t 1.34 0.8 … 1.8 t r a i n e d n e t w o r k u n s e e n d ata
  28. s e a r c h g r a d

    i e n t d e s c e n t r p r o p s i m u l at e d a n n e a l i n g g e n e t i c a l g o r i t h m d i f f e r e n t i a l e v o l u t i o n p a r t i c l e s w a r m o p t i m i z e r c o e v o l u t i o n a n t s y s t e m q p r o p m o n t e c a r l o
  29. $ d e m o h t t p s

    : // i n t e l l i g e n c e - r u b y f u z a 2 0 1 5 . h e r o k u a p p. c o m /
  30. c a n c e r i s d e

    s t r u c t i v e
  31. b u t d i a g n o s

    i s i s s o lva b l e
  32. s t o c h a s t i c

    m a c h i n e s t h e r i s e o f
  33. “ I f a m a c h i n

    e i s e x p e c t e d t o b e i n f a l l i b l e , i t c a n n o t a l s o b e i n t e l l i g e n t ” — A . T u r i n g
  34. ! @ s i e f i s i g

    h m i n / d i a g n o s i n g - c a n c e r - w i t h - a i s i m o n @ p l at f o r m 4 5 . c o m " # q u e s t i o n s