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

Demo_Friday

Avatar for Erin Erin
June 26, 2015
30

 Demo_Friday

Avatar for Erin

Erin

June 26, 2015

Transcript

  1. things  you   care  about   things  you   can

     influence   the  !pping  point   Take  poli5cal  ac5on  [only]  when  it  ma:ers.   Erin  Boyle  
  2. The  DATA   Wide  not  deep:       Of

     526  bill  votes:     4  sessions  of  Congress;       174  commi:ees;     1156  keywords;       1414  related  bills;       227  bill  sponsors  …       Manually  sorted  keywords   into  the  five  categories   displayed.  
  3. The  DATA   Wide  not  deep:       Of

     526  bill  votes:     4  sessions  of  Congress;       174  commi:ees;     1156  keywords;       1414  related  bills;       227  bill  sponsors  …       Manually  sorted  keywords   into  the  five  categories   displayed.   Skewed  dataset:   Most  bills  that  make  it  to  a  vote  pass.    
  4. Skewed  dataset:   Most  bills  that  make  it  to  a

     vote  pass.     The  DATA   Wide  not  deep:       Of  526  bill  votes:     4  sessions  of  Congress;       174  commi:ees;     1156  keywords;       1414  related  bills;       227  bill  sponsors  …       Manually  sorted  keywords   into  the  five  categories   displayed.  
  5. Random  Forest  Model   •  I  ul5mately  want  a  classifier,

     but  I  model  as  a   regression  to  get  more  insight     •  10-­‐fold  cross  valida5on     •  Precision  is  far  more  cri5cal  than  recall:      Precision:  71%,  Recall:  44%  
  6. Random  Forest  Model   •  I  ul5mately  want  a  classifier,

     but  I  model  as  a   regression  to  get  more  insight     •  10-­‐fold  cross  valida5on     •  Precision  is  far  more  cri5cal  than  recall:      Precision:  71%,  Recall:  44%   •  Trim  to  top  ~200  parameters  for  final  model   •  Run  that  on  bills  that  have  been  acDve  in  the  last  3   weeks  
  7. Bills  that  have  been  voted  on  since  the  site  went

     live  have  both  been   correctly  predicted:   Passed  at  58%  (close)   Intelligence  Authoriza5on  Act   June  16,  2015   Passed  at  67%  (not  close)   Protect  Medical  Innova5on  Act   June  18,  2015  
  8. Bills  that  have  been  voted  on  since  the  site  went

     live  have  both  been   correctly  predicted:   Passed  at  58%  (close)   Intelligence  Authoriza5on  Act   June  16,  2015   Passed  at  67%  (not  close)   Protect  Medical  Innova5on  Act   June  18,  2015  
  9. Random  Forest  Model   •  Some  of  the  top  classifiers:

      •  (Not  showing  non-­‐boolean  classifiers:     %  democrat/republican  in  session,  cosponsor  count)  
  10. Random  Forest  Model   •  Some  of  the  top  classifiers:

      •  (Not  showing  non-­‐boolean  classifiers:     %  democrat/republican  in  session,  cosponsor  count)  
  11. Bills  that  have  been  voted  on  since  the  site  went

     live  have  both  been   correctly  predicted:   Passed  at  58%  (close)   Intelligence  Authoriza5on  Act   June  16,  2015           q  Armed  forces  &  na5onal  security   q  HSBU  involved   q  Cosponsors  count  (0)   Passed  at  67%  (not  close)   Protect  Medical  Innova5on  Act   June  18,  2015           q  Armed  forces  &  na5onal  security   q  HSBU  not  involved   q  Cosponsors  count  (238)   Makes  passage  easier     Makes  passage  harder  
  12. Bills  that  have  been  voted  on  since  the  site  went

     live  have  both  been   correctly  predicted:   Passed  at  58%  (close)   Intelligence  Authoriza5on  Act   June  16,  2015           q  House  vote   q  Introduced  by  Rep.  Devin  Nunes                   (R-­‐CA,  male)  
  13. Top  features,  and  their  average  rate  of  close  calls:  

      Mitch  McConnell?   Commerce  bills  always  pass!  
  14. Top  features  that  don’t  have  boolean  values:   I  would

     expect  close  calls  to  go  about  at  50%  in  both   houses,  but  it  doesn’t  happen  in  the  Senate.  Perhaps   due  to  filibuster?  
  15. *   *  RF   Other  algorithms  considered   LogisDc

     Regression:    Tended  more   toward  recall  than  precision   Training  RF  on  each  topic’s  bills  only,   vs.  training  on  en5re  dataset  and   tes5ng  on  1/4th  (via  4-­‐fold  CV)  of  topic   bills.  La:er  performs  be:er,  so  I  stayed   with  global  RF.   I  also  did  a  grid  search  SVM  with  a    β-­‐ weighted  F-­‐score.  β  =  .2  to  encourage   precision  over  recall.     This  did  similarly  well  to  RF,  but  without  the   straighmorward  feature  trimming.  
  16. Random  Forest  Model   •  I  ul5mately  want  a  classifier,

     but  I  model  as  a  regression  to  get  more  insight.     •  10-­‐fold  cross  valida5on     •  Precision  is  far  more  cri5cal  than  recall.  
  17. Random  Forest  Model   •  I  ul5mately  want  a  classifier,

     but  I  model  as  a  regression  to  get  more  insight.     •  10-­‐fold  cross  valida5on     •  Precision  is  far  more  cri5cal  than  recall.  
  18. Random  Forest  Model   •  I  ul5mately  want  a  classifier,

     but  I  model  as  a  regression  to  get  more  insight.     •  10-­‐fold  cross  valida5on     •  Precision  is  far  more  cri5cal  than  recall.  
  19. Random  Forest  Model   •  Trim  to  top  ~200  parameters

     for  final  model   •  Run  that  on  bills  that  have  been  acDve  in  the  last  3  weeks   •  I  ul5mately  want  a  classifier,  but  I  model  as  a  regression  to  get  more  insight.     •  10-­‐fold  cross  valida5on     •  Precision  is  far  more  cri5cal  than  recall.  
  20. •  10-­‐fold  cross  validaDon  for:   •  Determining  overall  precision

     and  recall.   •  Looking  for  model  improvement  as  parameter  sets  are  incorporated.   Trim  final  parameter  set  to  ~200  parameters  that  are  important  over  all  10  valida5on   rounds  –  only  these  will  be  used  to  judge  upcoming  bills.   Data  processing  &  Algorithm:    Random  Forest