OK, @Johannes_B has already given you some advice. Meanwhile, I was trying to to tidy up your code: see if I have guessed your intentions correctly.
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
\usepackage[ascii]{inputenc} % Just to check that the source is still pure,
% 7-bit-clean ASCII when you execute it, as it
% was when I wrote it.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{mathtools}
\begin{document}
Text before.
\begin{gather*}
P(\omega_{k}|x) \approx \widehat{y_k}(x)
= \frac{\exp(w^{T}_{k}x')}{\sum^{q}_{j=1}\exp(w^{T}_{j}x')} \\[\jot]
\text{where} \quad x' = [1, x_1, x_2,\dots,x_p]^T \\
\text{with} \quad 0 \leq \widehat{y_k}(x) \leq 1 \quad
\text{and} \quad \sum^{q}_{k=1} \widehat{y_k}(x) = 1
\end{gather*}
Text after.
\end{document}
Anyway, I’d use a different approach, separating the part after “where” in another equation.
Addendum: Another possibility, using the split
environment. Note also the introduction of a higher level of abstraction, by means of the \innerprod
command.
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
\usepackage[ascii]{inputenc} % Just to check that the source is still pure,
% 7-bit-clean ASCII when you execute it, as it
% was when I wrote it.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{mathtools}
\DeclarePairedDelimiterX{\innerprod}[2]{(}{)}{%
#1\nonscript\medspace\delimsize\vert\nonscript\medspace\mathopen{}#2%
}
\begin{document}
Text before.
\begin{gather*}
\begin{split}
P\innerprod{\omega_{k}}{x} \approx \widehat{y_k}(x)
= \frac{\exp(w^{T}_{k}x')}{\sum^{q}_{j=1}\exp(w^{T}_{j}x')}
\qquad
&\text{where} \quad x' = [1, x_1, x_2,\dots,x_p]^T \\
&\text{with} \quad 0 \leq \widehat{y_k}(x) \leq 1 \\
&\text{and} \quad \sum^{q}_{k=1} \widehat{y_k}(x) = 1
\end{split}
\end{gather*}
Text after.
A few examples of the use of \verb|\innerprod|:
\begin{align*}
(a\mid b) &&
\innerprod{a}{b} &&
\innerprod[\Bigg]{a}{b} &&
\innerprod*{\frac{a}{b}}{\frac{c}{d}}
\end{align*}
\end{document}
This is the output:

x'
, notx^'
. But your coding should be thoroughly revised…mathtools
and its\text
facility. =>\text{and}
,\exp
. Additionally, you are not using any alignment separators (&
), why using align then?