Sunday, 1 October 2017

How would you hack an election?

If I wanted to win an election how would I do it?

In areas where there is no voter id what I need first is a list of past voting records. I need to know who doesn't vote. I need this because I am going to vote for them and I don't want any of them turning up by accident. People who are on the register but cannot vote because they are dead or incapacitated look like great candidates as well BUT these are too easy to check so actually I want to avoid this or someone might detect my fraud quite easily.

Once I have a lost of non-voters who are on the roll and alive and who could vote but never do what do I do next? I go to the polling station on their behalf and vote for them. Remember that they never vote and they are likely not to be recognised. I need to do this in small numbers at all of the polling stations. The more stations the better to spread the load and hide what I am doing. I don't want to do more than 50-100 votes in each of the stations. This means that my voting team needs to be at a maximum of 100 people. I do not want to have the same person voting at a station twice. These teams then move from station to station over the day. I can also do postal votes and absentee votes and these help. This is a big logistical operation but I don't care if I win the prize and control the government. You are talking thousands of operatives but they will target only a few key areas which can be flipped. Only marginals matter.

This is certainly possible for the swing states like Pennsylvania, Wisconsin etc. if I have Russian man-power available but I would need a forward base and a long term plan to get the people in place over time. Combine this with analytics, targeted media a big fake news operation and you can win the election.

How would you recognise this in the results? Can it be detected? The only thing that you see is a higher than expected turnout, unexpected demographic shifts and a high turnout from previous non-voters. But all of this is plausible deniability. There is not way an audit can say that this fraud exists unless you corroborate all of the suspicious votes. This is the perfect undetectable hack. Oddly enough Trump and Brexit both depended on previous non-voters.

Is it just me or does seasonal flu not make sense?

The NHS are warning that the UK is going to have a bad flu season this winter because there has been a bad flu season in the southern hemisphere this year.

But maybe they got a bad season this year because we got a bad season last year. Surely if this bad season alternates between northern and southern hemispheres one affecting the other then once a bad season starts all seasons have to be bad after that.

What is more puzzling is how is their bad season going to become our bad season? If it is being spread by air travel then why didn't we have a bad summer flu season? Why does it only kick off in our winter after their winter and flu season is over. The idea was that we get more flu and colds in winter because we spend more time in doors passing it to one another in the winter. I agree in an agrarian society where behaviour changes with seasons but I spend as much time in my office in the summer as I do in the winter. That is apart from the summer vacation but if I went to New Zealand won't I bring back the flu?

A big factor in my job and exposure is schools. The new school term brings colds and flu. Now we have much shorter summer holidays for schools in the UK we should see longer flu seasons if this is part of the cause for flu being seasonal. Seasonal flu is reality but our models as to why it is seasonal don't fit very well. We need to get some better models as to why it is seasonal and how it spreads between hemispheres.

Humidity and temperature have been shown to have effects but I suspect that there are more factors to take into account and imagining how flu seasons spread between hemispheres is another factor to consider.

How not to develop analytic talent

I wrote a review of the book Developing Analytic Talent by Vincent Granville and gave it a good bashing. But I could not do it justice to the total incompetence. Vincent Granville PhD is a perfect example of a snake-oil salesman. He speaks about his papers, his experience and the investment he has attracted, he talks about his books but a quick Google of his name just turns up a website which he set-up and which engages in some shady practices, including him writing articles pretending to be other authors, especially women in order to make it appear more gender neutral.

The review could not capture the many gems within the book so here are some of his best bits of writing.
Compound metrics are to base metrics what molecules are to atoms. Just like as few as seven atoms (oxygen, hydrogen, helium, carbon, sodium, chlorine and sulfur) can produce trillions of trillions of molecules and chemical compounds (a challenge for analytical and computational chemists designing molecules to cure cancer), the same combinatorial explosion takes place as you move from base to compound metrics. 
p110

Very nice but Helium is a noble gas and does not form compounds on Earth although it might do in special environments.  His PhD is not in chemistry

Apparently he also thinks that an app for pricing in amusement parks would be a good venture
Increase prices  and find optimum prices. (Obviously, it must be higher than current prices due to the extremely large and dense crowds visiting these parks, creating huge waiting lines and other hazards everywhere - from the few restaurants and bathrooms to the attractions).
p105

Alternatively they could build more bathrooms and more restaurants and make even more money from the large crowds rather than reducing foot-fall as people go elsewhere. Who are richer the owners of WallMart or the owners of Tiffany's? 

This however is the best and saved for page 174

The number of variables is assumed to be high, and the independent variables are highly correlated.
What? Wait let me see what the definition of independent variables is. That would be whose variation does NOT depend on the variation of another. That would mean not correlated. This is more than a slight howler this is so elementary that you cannot believe a single thing the author says. He then goes on to do regression in Excel.

On page 189 he talks about the possibility of getting negative variances - this is impossible. On page 190 he talks about the variance being bounded by 1 as a maximum. This is nonsense even with normalised data the variance = 1 V is not <1 as="" he="" nbsp="" p="" states.="">

Wednesday, 27 September 2017

How not to design a questionnaire. Lord Ashcroft's dangerous political polls.

Lord Ashcroft has had a big impact on election polling in the UK. He has even had favourable mentions with Nate Silver on his blogs. But I have been taking a deeper look into his polls.

I have to admit to some political activism and I was previously a Liberal Democrat Councillor. I collected canvassing data and fed it into the party's own analysis program and it makes predictions about the state of your campaign. Most of the time it got it pretty close to right and I won by the amount I expected. That was small local scale analysis.

Lord Ashcroft is well known and a Tory donor and he has been running polls in both the UK and more recently in the US. He conducted a lot of focus groups around the Trump election and also the Brexit vote. What concerns me is not the polls and the data, but the way the polls are carried out. Most specifically the questions that are used.

I was reading a story on CapX by Robert Colville about the demographic disaster awaiting the Conservative Party and he used some very particular phrasing.

If people think that multiculturalism, immigration, the internet, the green revolution and feminism are forces for good, they will vote Labour/Democrat. If they think they are bad, they will vote Tory/Republican.

Now who exactly thinks in those terms? Oh yes, there is a force for good and I am behind it 100%. People just never say that. Oh that is a force for evil/bad, I am really against that. These phrases are straight from Lord Ashcroft's poll published in his book Hopes and Fears. Participants had to chose on a scale whether they thought that:

  • Feminism
  • The green movement
  • The internet
  • Multiculturalism
  • Immigration
have made America better or worse.

I use these questions for my second year statistics class as examples of non-scientific questions. These are in fact sound-bites and propaganda disguised as poll questions. They provide a frame of reference to lead participants towards where the person asking the questions wants to take them. The questions are based on invoking feelings and reactions and not actually obtaining rational responses.

Take for example this more detailed question.

Thinking about the following changes in America over recent years, do you think they have made America better or worse?
More lesbian and gay couples raising children
How can lesbian women and gay men raising children have ANY effect WHATSOEVER on whether a country is better or worse? What does it mean for a country to be better or worse? If it means economically less successful then how do lesbian and gay couples raising children affect the economy? If it means the country has gotten worse because of a rise in crime then again how is this caused by lesbian and gay couples raising children? The responses to this question will be pure framing based on current personal experience. If your standard of living has declined recently then you will respond that America has become worse, but the relationship to lesbian and gay couples is forgotten in the question. I could have asked the same question about America getting better or worse and used "More Bush family members raising children" and I would get the same response.

This sort of question is nonsense. It is intended to bias and put words into the participant's mouths by limiting the spectrum of possible causes. The motivation behind these polls is generating easily digestible journalistic content. They can then summarise the poll by saying a majority of participants think that feminism or multiculturalism has made America/UK worse. These are leading questions and the poll is at best meaningless and at worst pure propaganda. Polls like this are designed to influence the opinions of participants and not to actually discover what their opinions are.

We need to think seriously about the impacts of polling carried out in this way, as for me it raises ethical concerns about how they are being carried out and how they are being used.

Thursday, 20 July 2017

Bill Gates, VR and Influenza Vaccines

Bill Gates was shown around the NIH where they wanted to show him how VR helps to create better vaccines.

As I said in another Blogpost. I began my research career in structure based drug design.  Then I learned that you models are only as good as the data you feed in and so I moved down the pipeline, first to crystallography and now to sequence data analysis. I know the limitations but the NIH wants money and they are less likely to talk about them.

The limitation in influenza research is sampling. We simply do not collect the data properly. We have lots of data from China because that is where we think future outbreaks might come from, but the last Swine Flu pandemic originated in Mexico. There is not enough systematic global collection of data. This means that unexpected changes catch us unaware. Most of the times we do pick the right vaccine candidates but sometimes we get it wrong. VR will not help this.

What will help is the IOT. That provides an opportunity for massive data collection. The Cloud allows us to share data globally. If we can stop the national laboratories from hoarding data this would also be a big step forward. The WHO also needs to be reformed to remove some of the political players who are a barrier to sharing. Scientists are bad politicians. My dad worked on a funding committee and they had to move meetings to secret locations because the scientists were always trying to lobby then and bully them into decisions. In influenza research there is a ruling clique that wishes to restrict research participation. When you mention citizen science or data sharing they have a fit.

So what should we be looking at today?

1) Why is there a wide-spread breeding failure in the Celtic seas? Is this related to the death of marine mammals? Both of these sets of species are possible influenza sources/sinks and it might be a good idea to do some influenza viral screens to see if a new more pathogenic strain has evolved. If it is an influenza it is probably H7 or H3 and that it can affect mammals would be a concern.

2) H5N8 from Viet Nam is a new emerging highly pathogenic H5 containing lineage. We had an outbreak in Korea that spread to North America and also Europe but it does not seem to be able to persist in either Europe or North America (although for North America that is disputed). However the most recent European cases are not related to the Gochang and Buan Korean lineages, but to a Viet Nam sequence that again spread via Korea.



The key is vigilance, wider participation and thinking outside the box. The bird breeding might be nothing and unrelated but lets do a quick check. Improved data collection and screening is where we will make the break-throughs not in the VR lab.

Wednesday, 19 July 2017

My F1000 paper on reassortment in H5N8 - even open peer review has flaws

This is really irritating me as this is version 3 of the same story. It is not even a particularly interesting story except it is if you think deeply about it.

What I want to show is that H5N8 in the US is a subtype that has been produced by multiple events where an H5 containing virus reassorts with an N8 containing virus. To do this I constructed a tree for ALL the H5 sequences in the database and ALL the N8 sequences in the database.

If I am wrong then the H5N8 sequences from the US would cluster in one group and not be spread across the tree in many distinct clades. They would at least be close neighbours. Am I wrong? Nope they are spread all over both trees. In the H5 tree there are lots of neighbouring H5 sequences that have been sampled but they are from other subtypes. In the N8 tree they are also widely spread with sequences from many other subtypes in between.

So here is the referees comment https://f1000research.com/articles/5-2463/v1#referee-response-18901

I am completely incredulous about how this is a possible argument for rejection.

If the referees are right int their arguments then you CAN have clades in a tree that are polyphyletic for subtype without reassortment being the cause. I can simply get from H5N2 to H5N8 by spontaneous mutation of the N2 to the N8 form. I can make hundreds of base changes and insertions and deletions and this is more likely than a simple reassortment event.

Now let me imagine this is not their argument and that they will admit that reassortment does exist in the clades but that they are not convinced about the specific H5N8 reassortment events. They are suggesting that these occur in both the N8 and H5 tree which are two independent samples in the same pattern by chance and that there is a need for the internal gene trees to corroborate these events. I say in the paper very clearly that I cannot KNOW what the origins of the H5 and N8 are and I can just make suppositions about them, but I know that a reassortment event has definitely occurred. Otherwise what are the chances that the H5 and N8 genes both undergo substantial mutational changes between samplings of H5N8 and that the neighbours include large numbers of sequences from many other subtypes? If this is true then H5N8 sampling must have been carried out appallingly or in a very biased manner while we detect all the other subtypes with ease.

To be honest I have the internal gene trees as I just finished them for another paper about a different subject and oddly enough they show exactly what I said in the paper. I was 100% right. These two referees are 100% WRONG. In fact their arguments are so illogical and unsupported by evidence that I was surprised that they were brave enough to put their names to them.

So let me ignore the sneering way the review is written, because everyone has a time in their life when they thing they know it all and recent graduates tend to fall into this trap more often than not. I know that I was the same 20 years ago when I started my career.

Let me consider how they use rhetoric in order to create a straw-man to knock down by suggesting that the paper is about discovering reassortment - it is not. The title is very clear it says reassortment in H5N8 and then only part of the H5N8 tree - the US part is actually the main focus of the study. It is a paper about a specific example and the dangers of collecting data by subtype as this gives an incomplete picture of sequence evolution in a segmented virus that can undergo reassortment.

This is the point. If the segments can reassort then they can pass between multiple subtypes in their evolutionary pathway. This is not rocket science this is just suggesting it is better to consider this possibility in trees and sampling and not just carry out phylogenetic analysis by subtype.

This gives me with two options:
1) The referees are idiots.
2) The referees forgot to declare the conflict of interest in that they have a skewed view-point in order to protect their existing work. This paper starts to undermine the idea of monophyletic clades for subtype which underpins the WHO nomenclature system for H5 which Justin Bahl helps to manage.

I do not think the referees are idiots, but I do think the second point is true and that there are good reasons why Dr Bahl should have declared a real and prejudicial interest and NOT taken up the review. Nobody is objective about seeing their work undermined, ever. I also think this is a good reason for me to ban Dr Bahl and Joseph Hicks from EVER reviewing any of my papers and for editors to consider any review that they provide with suspicion.

Saturday, 29 April 2017

Let's go back to the beginning.

I need to tell a long story and so I need to go back to the beginning. Part of this story I have already told but not very well and so this is an attempt to put everything into context.

I did a degree in Chemistry and Law at the University of Exeter. When it came to choosing what to do next I wanted to stay in research. I had met some lawyers at the recruitment fairs and they had convinced me that I did not want to be a lawyer. My drive was wanting to change the world, their motivations were purely financial. I was not going to be Perry Mason and I was not going to write environmental protection legislation and so I turned back to science which had been my dream since my teens.

What caught my eye was protein molecular modelling. I had not done much biological chemistry or biochemistry as an under-graduate but the beauty of the computer models captivated me. It was like the best video game I had ever seen (at that time they used the best graphics computers you could buy and they cost tens of thousands). I had applied for PhDs elsewhere in physical chemistry including with P.W. Atkins (his response was he didn't supervise students, then why was he is the graduate prospectus?). But nothing compared to those ribbon images of proteins.

I received the Norman Rydon scholarship from the Chemistry Department at Exeter. This allowed me to pick my supervisor and the money would come with me. It was an incredible stroke of luck and so I got to follow my dream and study molecular modelling of proteins. My PhD was in homology modelling of FBP aldolase and also including using molecular dynamics to study the conformations of peptide inhibitors. Unfortunately about the time I finished Swiss-Model appeared and what had taken me 3 years to do now could be done in 10 minutes on a server ... That was the end of homology modelling research for me. What I also learned was that modellers depend on the quality of the data they are given. The FBP structure that I used had some limitations and so my models shared those limitations and so I went back a step to become a protein crystallographer.

While I was doing my PhD and protein crystallography post-doc I was the general computational biologist or bioinformatician on call for the research group. This was the mid-1990s and so bioinformatics did not really exist as a subject. I did sequence alignment, BLAST searches and phylogenetic analysis for projects where we tried to understand the evolution of protein structure and function.

What I realised from building these alignments and trees was that if your data is very partial and contains mostly sequences from related species and only a few sequences from more distant species, then this will bias the tree towards your data and possibly away from a better representation of reality. The problem is how do you select sequences to include and exclude? An even bigger issue is the irregularity of the sampling across the "tree of life" (we also did not call it that then either we just called it across the kingdoms). We worked with the recently discovered Archaea and they are dramatically different to the bacteria and the eukaryotes and putting the Archaeal sequences into trees was difficult.

From alignments I also learned that making secondary structure predictions on all the sequences in the alignment is better than just making predictions on a single instance. They should all have the same structure and so this sequence level variation should disappear in predictions. This turned out the be a major discovery (made by someone else) and that ended investigation in secondary structure prediction (OK I have missed out neural nets etc. but I have serious doubts that they contribute anything more than the use of multiple alignment and using GOR or even Chou and Fasman).

I continued as a post-doc in protein crystallography but also dabbled in bioinformatics until in 1999 Exeter set-up an MSc in Bioinformatics. As one of the local experts I helped to set up the course and I taught the sequence and structure modules. I was made a lecturer in 2000 and I remained at Exeter for five years until I got caught up in the departmental politics of the closing of the Chemistry Department (I was a lecturer in Biological Sciences and Engineering and Computer Science at the time). Exeter made me redundant but the atmosphere had soured for me there anyway, because they disapproved of me trying to have a work life balance and putting my wife and newly born children first. They also did not like my involvement in politics. I was a city councillor in Exeter for five years.

One of my students had said did you see this advert for a bioinformatics lecturer at Oxford. I hadn't but the closing date hadn't passed and so I applied. My curriculum was okay. I was much better at teaching than research. Setting myself up as an independent researcher had also been made difficult by having to separate my research from my PhD and post-doctoral supervisor. Luckily I had the support of Dr Ron Yang and we had worked together on some projects. He did the computing (most of it) and I gave the biological input (a bit at the end to make sure that it actually worked). This meant that I had my four publications and that is what matters in UK academia.

I went to the interview at Oxford. I thought it went well. The head of the course was young, bright and very unexpected. Dr (now Prof.) Charlotte Dean would go on to be head of the department of statistics. What was unexpected was how relaxed and casual she was. She was not the serious unapproachable Oxford don. They offered me the job on the same day and I started a few months later. We moved from Devon to Oxfordshire. I lead the teaching in the modules Charlotte was not leading. In Oxford the Bioinformatics MSc was in the Department of Statistics and I became a Departmental Lecturer in Statistics. This also meant I taught statistics, Perl programming and he biology courses. I had gone from being a lecturer in Biological Sciences and Engineering and Computer Science to a lecturer in Statistics. I had degrees in none of these subjects but I am 100% a computational biologist. This is the curse of being inter-disciplinary. I did start to think about systems biology at Exeter and we had a meeting there where I met Kitano and his work was a major influence on my thinking.

This is when I became an accidental statistician and I am glad that it happened, because apart from the stunning molecular images I found that data is what fascinates me. I just can never get enough data. I think that if I had been introduced to statistics earlier on then I might have been a statistician from the start but at school it is never taught well and people fear statistics. At Oxford I learnt to love it. When the lecturer who taught statistical data mining left I took over his module. Now I was teaching masters level statistics to people who had degrees in maths and some of them from Oxford. It was an amazing experience, although I have to admit to spending the entire summer reading the textbooks from cover to cover (thanks to Hastie, Tibshirani and Friedman and also to Brian Ripley).

Charlotte went on to other things and I became acting head of the MSc teaching more and more. My interests now were systems biology and trying to put together data from different experiments and perspectives. What really troubled me and what still sits in the back of my mind is entropy and how it works in living systems. I was a book worm for systems biology.