Treating missing data in voting pattern analysis I'm trying to analyze voting patterns of Ukraine's parliament deputies. I scraped all the data on their voting during last session. Each data entry has following information:
Deputy name, date, bill number, vote. The vote field can be yes, no, didn't vote (treated as no) and not present. 
My problem is with "not present" vote type. I don't want to have deputies that were often absent to be classified as similar as I only care when they voted yes or no. I encoded votes as dummy variables, but not sure what to do with "not present" vote. Treat it as No will definitely skew the results making those who missed a lot of voting sessions look alike. Removing whole columns where one of the deputies wasn't present is also not a solution as I will have no data remaining.
My primary tool of analysis is python with scikit-learn.
 A: I suggest that you encode your data so that yes, no, and absent are all represented. 
If you have prepared your data with rows for voters and columns for votes, and encoded yes, no, and missing as 1, 0, 9, you can use sklearn.preprocessing.OneHotEncoder to map this into a feature space with columns for yes, no, and missing:
import sklearn.preprocessing
X = sklearn.preprocessing.OneHotEncoder().fit_transform(observed_votes)

import sklearn.decomposition
X_2d = sklearn.decomposition.PCA(n_components=2).fit_transform(X.toarray())

plt.plot(X_2d[:,0], X_2d[:,1], 'o')


Here is an IPython Notebook that simulates some data for the observed_votes so you can see how I'm thinking of organizing things.
A: In the end I decided to change my voting encoding scheme. I used -1 for No votes, 0 for absent and +1 for Yes votes which makes sense, i think. Here is what I got after I TSNEed the data. 

Very clear delineation of different groups in the parliament. Plus gives an insight with whom "unaligned" deputies are actually aligned.
