I'm trying to learn some machine learning theory, in particular **maximum likelihood estimation**.

Let me preface my question by saying that I'm very familiar with the Naive Bayes classifier, Bayes' Rule, and related notation. Below, I understand that $y$ is a class label and $X$ is a feature representation.

[![enter image description here](https://i.stack.imgur.com/joapT.png)](https://i.stack.imgur.com/joapT.png)

Now, my confusion stems from two different definitions of maximum likelihood estimation. Oddly, they are by the same author, Kevin P. Murphy.

### Definition 1

Here's what he wrote in his 2012 book "[Machine Learning: a Probabilistic Perspective](https://probml.github.io/pml-book/book0.html)", where he first describes $D$ (a training set of ($X, y$) pairs), and $H$, a hypothesis space, which I didn't understand. I was thinking that a hypothesis is a class label.

[![enter image description here](https://i.stack.imgur.com/kWE3v.png)](https://i.stack.imgur.com/kWE3v.png)

He then describes maximum likelihood estimation to be:
$$
\hat{h}^{MLE} \triangleq \underset{h}{\mathrm{argmax}}\, P(D|h)
$$

[![enter image description here](https://i.stack.imgur.com/ZDcYW.png)](https://i.stack.imgur.com/ZDcYW.png)

### Definition 2

Now this is what he wrote in his upcoming 2021 book "[Probabilistic Machine Learning: An Introduction](https://probml.github.io/pml-book/book1.html)". Here, MLE is applied to get the parameters $\theta$ that satisfy $\underset{\theta}{\mathrm{argmax}}\, P(D|\theta)$ .

[![enter image description here](https://i.stack.imgur.com/punBe.png)](https://i.stack.imgur.com/punBe.png)

### Specific questions

1. Why are there two definitions of MLE, one to satisfy $\underset{h}{\mathrm{argmax}}\, P(D|h)$ and another to satisfy $\underset{\theta}{\mathrm{argmax}}\, P(D|\theta)$ ?
2. Is "hypothesis" a class label or a learnable parameter in these contexts?
3. In Bayes' Rule, we see the likelihood term as $P(X|y)$ with class label $y$. How does it relate to Definition 2, where we see the likelihood term $ P(D|\theta)$ with parameters $\theta$ instead of label $y$ ?