I am reading this book "Pattern Recognition and Machine Learning " - Christopher M. Bishop . My question is around equation $3.13$ page $141$.In the book , he talks of Maximum likelihood estimate of the parameter vector $w$ for a non linear regression as follows :
We have a feature vector $x \in R^{k}$ , a basis function $\phi_{i}$ , and we call $ \phi = [\phi_{0},\phi_{1},\phi_{2},....\phi_{k-1},]$ . The book then proceeds with modelling a targe variable $t$ as
$$t= y(x,w) + e$$ where $y(x,w) $ is our model and $e$ is a gaussian noise with $0$ mean and variance $\beta^{-1}$.
So we write : this uncertainity over $t$ as p.d.f over $t$ given by :
$$ N(t|y(x,w),\beta) $$.
The book then proceeds with the likelihood function , for $N$ overstations to be :
$$ P =\prod_{i=1}^{i=N} N(t_{i}|y(x_{i},w),\beta )\\
\Rightarrow ln(P) = \sum_{i=1}^{i=N}
N(t_{i}|y(x_{i},w),\beta)
=\frac{N}{2}ln(\beta) -\frac{N}{2}ln(2\pi) -\beta E_{D}w$$ where $E_{D}w= \frac{1}{2}\sum_{i=1}^{i=N}[ t_{n}-w^{T}\phi(x_{n})]^{2}$
Now maximizing the logLikelihood with respect to $w$ is equivalent to minimizing the $E_{D}w$.
Now the author calculates the gradient of $E_{D}w$ and writes :
$$ \nabla_{w}ln(P) = \sum_{n=1}^{N}[t_{n}-w^{T}\phi(x_{n})]\phi(x_{n})^{T}$$ .
My doubt is that the dimension of $$does not match the dimension of $w$ . Reasoning , my understanding from the above texts is that the dimension of $w$ and $\phi$ have to be same for $y(x,w)$ to be real valued. Now considering the R.H.S for the gradient equation, the term $[t_{n}-w^{T}\phi(x_{n})]$ is real valued and $\phi_{n}^{T}$ have dimensions equal to $w^{T}$ . So the gradient does not seem to match $w$ in dimensions , where am i getting it wrong ?
Edit /Note :
After comprehensive answer by @user3658307 . I went to solve the original question which was about finding the optimal weights and considering to the gradient to be
$$ \nabla_{w}ln(P) = \sum_{n=1}^{N}[t_{n}-w^{T}\phi(x_{n})]\phi(x_{n})$$
i.e without a transpose over the $\phi(x_{n})$ .
I found the optimal weights to be same as the optimal weights found out by the author considering his equation of gradient !