All the times Regan voted with Harper and against Leslie in the last Parliament

This is a draft from Sep. 5, 2015. Links may be broken.

csv voting records are available at http://www.parl.gc.ca/Parliamentarians/en/members by clicking on the member and then on “Work” and then “All votes by this Member.” You can see the link I used for Megan Leslie at http://www.parl.gc.ca/Parliamentarians/en/members/Megan-Anissa-Leslie(58550)/Votes, in the Export: CSV link. That file was renamed Leslie41parl2session.csv.

regan41parl2session <- read.csv("Regan41parl2session.csv", header = TRUE)
leslie41parl2session <- read.csv("Leslie41parl2session.csv", header = TRUE)
harper41parl2session <- read.csv("Harper41parl2session.csv", header = TRUE)

leslieSmall <- data.frame(leslie41parl2session$Vote.Number, leslie41parl2session$Member.s.Vote)
reganSmall <- data.frame(regan41parl2session$Vote.Number, regan41parl2session$Member.s.Vote)
harperSmall <- data.frame(harper41parl2session$Vote.Number, harper41parl2session$Member.s.Vote)

names(leslieSmall)[1] <- "Vote.Number"
names(reganSmall)[1] <- "Vote.Number"
names(harperSmall)[1] <- "Vote.Number"

smallMerge <- merge(leslieSmall, reganSmall, by="Vote.Number")
smallMerge <- merge(smallMerge, harperSmall, by="Vote.Number")

smallMerge now contains all of Leslie, Regan, and Harper’s votes for the most recent Parliament – that is, all the ones in which all three voted. Let’s take a look at the ones in which Leslie and Regan voted differently, but Regan voted with Harper.

L_Diff_R_H_Same <- smallMerge$Vote.Number[smallMerge$leslie41parl2session.Member.s.Vote !=     
                         smallMerge$regan41parl2session.Member.s.Vote
                       & smallMerge$harper41parl2session.Member.s.Vote == 
                         smallMerge$regan41parl2session.Member.s.Vote]

L_Diff_R_H_Same
##  [1]  11  71  93 146 147 170 173 174 180 185 190 201 203 240 242 277 279
## [18] 281 282 291 313 314 319 367 456 461 464

It’s a bit more readable to get the subject headings for those votes; note that the indices reported below are local to the vector. The subjects correspond, in order, to the vote numbers above.

leslie41parl2session[leslie41parl2session$Vote.Number %in% L_Diff_R_H_Same, 
                     6]
##  [1] Opposition Motion (Keystone XL pipeline)                                                                                                                                                                                                                                                                   
##  [2] 2nd reading of Bill C-504, An Act to amend the Canada Labour Code (volunteer firefighters)                                                                                                                                                                                                                 
##  [3] 2nd reading of Bill C-20, An Act to implement the Free Trade Agreement between Canada and the Republic of Honduras, the Agreement on Environmental Cooperation between Canada and the Republic of Honduras and the Agreement on Labour Cooperation between Canada and the Republic of Honduras             
##  [4] Government Business No. 10 (Extension of sitting hours and conduct of extended proceedings) (amendment)                                                                                                                                                                                                    
##  [5] Government Business No. 10 (Extension of sitting hours and conduct of extended proceedings)                                                                                                                                                                                                                
##  [6] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
##  [7] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
##  [8] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
##  [9] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
## [10] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
## [11] Concurrence in an opposed item                                                                                                                                                                                                                                                                             
## [12] 3rd reading and adoption of Bill C-20, An Act to implement the Free Trade Agreement between Canada and the Republic of Honduras, the Agreement on Environmental Cooperation between Canada and the Republic of Honduras and the Agreement on Labour Cooperation between Canada and the Republic of Honduras
## [13] Motion to adjourn the House                                                                                                                                                                                                                                                                                
## [14] Bill C-13, An Act to amend the Criminal Code, the Canada Evidence Act, the Competition Act and the Mutual Legal Assistance in Criminal Matters Act (report stage amendment)                                                                                                                                
## [15] Concurrence at report stage of Bill C-13, An Act to amend the Criminal Code, the Canada Evidence Act, the Competition Act and the Mutual Legal Assistance in Criminal Matters Act                                                                                                                          
## [16] Bill C-18, An Act to amend certain Acts relating to agriculture and agri-food (report stage amendment)                                                                                                                                                                                                     
## [17] Concurrence at report stage of Bill C-18, An Act to amend certain Acts relating to agriculture and agri-food                                                                                                                                                                                               
## [18] First Report of the Standing Committee on Agriculture and Agri-Food (amendment)                                                                                                                                                                                                                            
## [19] First Report of the Standing Committee on Agriculture and Agri-Food                                                                                                                                                                                                                                        
## [20] Opposition Motion (Proportional representation)                                                                                                                                                                                                                                                            
## [21] Bill C-44, An Act to amend the Canadian Security Intelligence Service Act and other Acts (report stage amendment)                                                                                                                                                                                          
## [22] Concurrence at report stage of Bill C-44, An Act to amend the Canadian Security Intelligence Service Act and other Acts                                                                                                                                                                                    
## [23] 3rd reading and adoption of Bill C-44, An Act to amend the Canadian Security Intelligence Service Act and other Acts                                                                                                                                                                                       
## [24] Government Business No. 17 (Military contribution against ISIL) (amendment)                                                                                                                                                                                                                                
## [25] 3rd reading and adoption of Bill S-7, An Act to amend the Immigration and Refugee Protection Act, the Civil Marriage Act and the Criminal Code and to make consequential amendments to other Acts                                                                                                          
## [26] Ways and Means motion No. 25                                                                                                                                                                                                                                                                               
## [27] Motion to concur in the 21st Report of the Standing Committee on Procedure and House Affairs (motion M-489, Election of the Speaker)                                                                                                                                                                       
## 322 Levels: [number \x96 one to ten in letters, others in numbers with st,rd,th] Report of the [Committee Name] ...

Ask your Ward 13 candidate

Before you vote on Monday, please find out what your preferred candidate for Ward 13 will do about affordable housing. I believe it can’t be solved any time soon if we don’t take strong action against reseller websites.

A vote for Darren Abramson means a vote for Toronto city action that goes at least as far as Vancouver’s actions.

What will you do about Airbnb taking units from residents and driving up rent?

  • contact@kristynwongtam.ca
  • info@aftabkhuram.com
  • contact@joncallegher.com
  • jrforget@live.ca
  • team@timfortoronto.com
  • ward13@john-jeffery.com
  • walied@votewalied.ca
  • team@gladyslarbie.ca
  • votebarbaralavoieward13@gmail.com
  • hello@ryanlester.ca
  • voteforperez@hotmail.com
  • smithermantoronto@gmail.com
  • votejordanstone@gmail.com
  • Lucy@NeighbourhoodsFirst.ca
  • info@megannwillson.ca
  • rob.wolvin@gmail.com

Let’s Be Careful About Capsule Networks vs. ConvNets

This seems to be a popular introduction to Capsule Networks. In Part I, on the “intuition” behind them, the author (not Geoffrey Hinton, although formatted the same as a quote from him immediately above) says:

Internal data representation of a convolutional neural network does not take into account important spatial hierarchies between simple and complex objects.

This is very simply not true. In fact, Sabour, Hinton and Frosst address this issue in their Dynamic Routing Between Capsules [pdf]:

Now that convolutional neural networks have become the dominant approach to object recognition, it makes sense to ask whether there are any exponential inefficiencies that may lead to their demise. A good candidate is the difficulty that convolutional nets have in generalizing to novel viewpoints. The ability to deal with translation is built in, but for the other dimensions of an affine transformation we have to chose between replicating feature detectors on a grid that grows exponentially with the number of dimensions, or increasing the size of the labelled training set in a similarly exponential way. Capsules (Hinton et al. [2011]) avoid these exponential inefficiencies…

This is fundamental, and I hope folks avoid the error in thinking that ConvNets can’t “take into account important spatial hierarchies between simple and complex objects”. That’s exactly what they do, but as models of how brains take into account these hierarchies under transformations, they are badly inefficient at doing so.

History and Philosophy of Science, Present Day

From Andrew Ng’s recent video on end-to-end deep learning. Really helps me make sense of being in Cognitive Science/Computer Science graduate programs ~1999-2006.

“One interesting sociological effect in AI is that as end-to-end deep learning started to work better, there were some researchers that had for example spent many years of their career designing individual steps of the pipeline. So there were some researchers in different disciplines not just in speech recognition. Maybe in computer vision, and other areas as well, that had spent a lot of time you know, written multiple papers, maybe even built a large part of their career, engineering features or engineering other pieces of the pipeline. And when end-to-end deep learning just took the last training set and learned the function mapping from x and y directly, really bypassing a lot of these intermediate steps, it was challenging for some disciplines to come around to accepting this alternative way of building AI systems. Because it really obsoleted in some cases, many years of research in some of the intermediate components. It turns out that one of the challenges of end-to-end deep learning is that you might need a lot of data before it works well. So for example, if you’re training on 3,000 hours of data to build a speech recognition system, then the traditional pipeline, the full traditional pipeline works really well. It’s only when you have a very large data set, you know one to say 10,000 hours of data, anything going up to maybe 100,000 hours of data that the end-to end-approach then suddenly starts to work really well. So when you have a smaller data set, the more traditional pipeline approach actually works just as well. Often works even better. And you need a large data set before the end-to-end approach really shines.”