# Clarifications on Poisson Regression

I am watching this Bloomberg course on machine learning, and i need help on understanding the application of Poisson Regression. So it goes like this

Let $$Y=\{1,2,3,...\}$$ and let $$X$$ be a vector in $$\mathbb{R}^d.$$

We can then model $$Pr(Y_i|X_i) = e^{W^TX}.$$ The vector $$W$$ can then be found using an optimization algorithm. But, $$e^{W^TX}$$ is not always an integer. So, my question is how do we predict a particular $$Y_i$$ given $$X_i.$$

In Poisson regression we use exponential link function. This means that $$\mathbb{E}[Y | X] = e^{W^TX}.$$ Note that the expression above contains the expectation, not a probability. The expression is known as intensity and is usually denoted with $$\lambda(X)$$. Conditional on $$X$$, variable $$Y$$ has Poisson distribution with parameter $$\lambda(X)$$. This means that $$P(Y = k | X) = \frac{\lambda(X)^k}{k!} e^{-\lambda(X)} = \frac{e^{kW^TX}}{k!} e^{-e^{W^TX}},\ \ \ k = 0, 1, 2, ...$$ As you can see, $$Y$$ takes only non-negative integer values.