# How do weka classifiers deal with missing values? [closed]

I tried using a training set that has missing values. I applied filters (like replace missing data) and then after there were no more missing data I applied naive bayes, trees etc... I thought this was the only way to do it: Preprocess the dataset and prepare it for classification.

But then, without meaning to, I learnt that the classifiers can deal with missing data on their own without preprocessing (and the accuracy, based on my tests, is almost the same) so I wanted to know how do these classification algorithms do it? I couldn't find any useful documentation that explains whether these classifiers are replacing the missing values with the average/most recurring value...

## closed as off-topic by gung - Reinstate Monica♦Dec 19 '18 at 1:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – gung - Reinstate Monica
If this question can be reworded to fit the rules in the help center, please edit the question.

• You'll need to read the Weka documentation to learn more about how Weka works. – gung - Reinstate Monica Dec 19 '18 at 1:13

Naïve Bayes is particularly simple. If you are predicting a class C with values $c_1, ..., c_n$, for each predictor X, you need to estimate $P(c_i | X=x)$. You can make these estimates based on all available points for which X is known. That means that for different predictors, you might be using different collections of instances to make the estimates.