# Binary classification of partially labeled data

One of my friends was asked this question in an interview. A clue/restriction is given: Do NOT use semi-supervised learning techniques.

Suppose you have a binary classification problem: There are ~10K labeled points and ~1M unlabeled points. What are the steps in solving this problem?

• If you are also learning from the unlabeled data you are doing semi-supervised learning in my book (Wikipedia: Semi-supervised learning is a class of supervised learning tasks and techniques that also make use of unlabeled data for training...), so the only option I see left is to ignore the unlabeled data. They never said it had to perform as well as the semi-supervised approach...
– Emre
Jun 30 '17 at 18:27
• You can use the labelled datapoints to build a supervised binary classifier; you can use clustering for the unlabelled datapoints. Though that would be two separate processes.... Jul 1 '17 at 17:45
• Decide an algorithm (say, Logistic Regression). Then suppose you solve the classification problem considering the labeled points only (The usual 70% training, 15% cross validation, 15% testing etc.). Now you know the best classification model. Now if you apply this model to the unlabeled points, what is the problem? Of course, the underlying assumption is that ALL the points are generated from the same (unknown) distribution/process.
– PTDS
Jul 3 '17 at 4:26

## 1 Answer

You of course cannot use them as training data, but they can still have some potential uses, for example:

-You can make predictions on that data and see if the distribution of the classes are similar to those in the labeled data.

-You can use them for feature engineering – e.g. if you are using something like principal components, or if you are using averages for some categorical variable (e.g. you have a variable like state and another like income, and you augment the state variable by creating a feature that is the average income for that state).

-If you need to impute missing values in the predictors, it’s better to use the whole dataset for that.

-You can see if the distributions of the predictor variables are similar, and if you see that, for example, in your test data you tend to predict poorly for observations with a low value of variable ‘x1’ and the data with no labels has mostly low values of ‘x1’, then you should perhaps change your model.