Assume that a classier has been trained already (no missing training data), but a prediction has been requested based on an observation that does not include every feature. How can we handle this missing feature?
2 Answers
In evaluation (test) phase, when data point $x_n$ has $d$ missing features at indices $M=\{m_1,...,m_d\}$, corresponding terms $P(x_i|C_k),i \in M$ are simply removed from the classifier. That is, classifier $$C(x_n) = \underset{k \in \{1,..,K\}}{\mbox{argmax }}P(C_k)\prod_{i}P(x_i=x_{n,i}|C_k)$$ is replaced with $$C(x_n) = \underset{k \in \{1,..,K\}}{\mbox{argmax }}P(C_k)\prod_{\color{blue}{i:i \notin M}}P(x_i=x_{n,i}|C_k)$$
where $i$ iterates over features, $x_{n,i}$ denotes the $i$-th feature of data point $n$, and there is $K$ classes in total.
You tend to avoid these situations while preprocessing your data. You impute the missing data. In production terms, frameworks like H2O handle quite elegantly. If you mean that there's a dimension mismatch, then H2O can still handle it.