# Naive Bayes + KDE = Lazy?

If I in Naive Bayes use Kernel Density Estimation to estimate logarithms of the conditional probabilities of the attributes in each class $$\ln p(x_j|C_k)$$ can we consider this classifier to be an example of lazy learning? In my opinion it will be lazy because I take part of learning from Naive Bayes classifier:

$$\underset{k\in\{0,1,\dots,K\}}{\operatorname{arg\,max}} \ln p(C_k) + \sum_{j=1}^N \ln p(x_j|C_k)$$

I'm not familiar with "lazy learning", but given the definition

lazy learning is a learning method in which generalization of the training data is, in theory, delayed until a query is made to the system, as opposed to in eager learning, where the system tries to generalize the training data before receiving queries.

Naive Bayes algorithm is not "lazy", because it learns the distribution of the training data. At query time you just apply what you have learned from training sample, to the query.

Using kernel densities does not seem to change anything about it.

A clarification on the meaning of "lazy learning" is provided by the definition of the opposed term "eager learning", according with wikipedia

... a learning method in which the system tries to construct a general, input-independent target function during training ...

In other words a learner which collects the training data and use it directly at prediction time is "lazy". A kernel density estimator, as any instance based learners, collects observations and use them directly at prediction time. Thus a NaiveBayes using KDE event types is a lazy learner.

A good opposing example is NaiveBayes with Gaussian event types. In that case, during training phase the parameters of conditional normal distributions involved are fitted and, once that happens, the training data is not used anymore. The prediction is computed solely based on the functional form and fitted parameter values.

It is misleading to connect lazy learning with online updating. It is true that instance based learners are much easier to handle online learning, because it is easy to put or remove something from a collection. However the reason for lazy learning it the online part (for many models one can update online fitted parameters for example), but the fact that there are no ways to compress the input data into something smaller. Most of the time lazy learners does not assume a general structure of the whole input space, but local approximations.