Classifying users by demographic using incomplete data
I think you can make use of a "naive Bayes" classifier here. In that case, the class (M or F) probability is a product of terms, one term for each available feature set, and you just ignore (exclude from the product) any feature set that is missing.
Here is the justification. Let's say the feature sets are X1, X2, X3. Each of these is a vector of features. The naive Bayes assumption is that feature sets are independent given the class, i.e., P(X1, X2, X3 | C) = P(X1 | C) P(X2 | C) P(X3 | C). (Remember that this is just a simplifying assumption -- it might or might not be true!) When all feature sets are present, the posterior class probability is just P(C | X1, X2, X3) = P(X1, X2, X3 | C) P(C) / Z = P(X1 | C) P(X2 | C) P(X3 | C) P(C) / Z, where Z is the normalizing constant that makes the probabilities of the 2 classes add up to 1. So to make use of this formulation, you need a density model for each of the feature sets; if this approach makes sense to you, we can talk about those density models.
Now what if a feature set (let's say X3) is missing? That means we need to calculate P(C | X1, X2) = P(X1, X2 | C) P(C) / Z. But note that P(X1, X2 | C) = integral P(X1, X2, X3 | C) dX3 = integral P(X1 | C) P(X2 | C) P(X3 | C) dX3 = P(X1 | C) P(X2 | C) integral P(X3 | C) dX3 by the naive Bayes assumption. Note that integral P(X3 | C) dX3 = 1, so P(X1, X2 | C) = P(X1 | C) P(X2 | C), i.e., the naive Bayes assumption still holds for just the observed feature sets, so you can go ahead and calculate P(C | X1, X2) = P(X1 | C) P(X2 | C) P(C) / Z, i.e., when some feature set is missing in a naive Bayes model, just ignore it.
I have some data containing usernames and their respective genders.
For example, an entry in my data list may look like:
{User: 'abc123', Gender: 'M'}
For each username, I am also given a bag of text, images, and locations attached to each of them, although it's not necessary that a user has at least one text, one image and one location attached to them.
For each data source, I can translate them into a vector of features, which I then feed into a classifier. I can then confirm if the classifier is effective via 10-fold cross-validation.
I want to combine some output from all the classifiers such that I can feed them into a meta-classifier to hopefully improve accuracy.
The problem is that since the data is incomplete, I can't simply combine all the vectors generated from each data source and feed them into one classifier. Some users may not have image data, or others may not have location data.
My current idea is to use each classifier to obtain some category probability set for each user, something like [Male: 0.75, Female: 0.25] from each data source's classifier, multiply all the categories' values, and use the highest value as the program's predicted category.
So if I have 1 classifier for each data source (text, image, location), then I have a total of 3 classifiers. Even if one or two of the data sources are missing for some users, I can still obtain a category probability set for those users.
Does scikit-learn have any algorithm that can output a probability weight that the user is of some gender instead of just classifying them?
Or is there some other algorithm that satisfies my needs?
Thanks for going through my wall of text!