I want to define my loss function as following picture
How can i do this?
I can make three proposals, but you can mix the first two.
However, I'd prefer the simpler third way.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
First way
\[
L_\varepsilon\bigl(y,f(x,w)\bigr)=
\begin{cases}
0 & \bigl|y-f(x,w)\bigr|\leq\varepsilon,\\
\bigl|y-f(x,w)\bigr|-\varepsilon & \text{otherwise},
\end{cases}
\]
Second way
\[
L_\varepsilon(y,f(x,w))=
\begin{cases}
0 & |y-f(x,w)|\leq\varepsilon,\\
|y-f(x,w)|-\varepsilon & \hfill\text{otherwise},
\end{cases}
\]
Third way
\[
L_\varepsilon(y,f(x,w))=
\max\{0, |y-f(x,w)|-\varepsilon\}
\]
\end{document}
Here there is my welcome to TeX.SE. Your screenshot seem the font Cambria and I have created the similar image that you have glued. Therefore I have used, before, fontspec package that you can compile with XeLaTeX.
\documentclass[12pt]{article}
\usepackage{unicode-math}
\usepackage{fontspec}
\setmainfont{Cambria}
\setmathfont{Cambria Math}
\begin{document}
\[L_\varepsilon\bigl(y,f(x,w)\bigr)=
\begin{cases}
0 & |y-f(x,w)|\leq\varepsilon;\\
\bigl|y-f(x,w)\bigr|-\varepsilon &\mathit{ otherwise,}
\end{cases}
\]
\end{document}
You can use also the classic pdfLaTeX that when you compile obtain this output:
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\[L_\varepsilon\bigl(y,f(x,w)\bigr)=
\begin{cases}
0 & |y-f(x,w)|\leq\varepsilon;\\
\bigl|y-f(x,w)\bigr|-\varepsilon &\mathit{otherwise,}
\end{cases}
\]
\end{document}
\[
L_\varepsilon(y,f(x,w)=\begin{cases}
0&|y-f(x,w)|\le\varepsilon;\\
|y-f(x,w)|-\varepsilon&\text{otherwise,}
\end{cases}
\]
(where I assume that some environment causes the italics of what should be \text in your original; also I find the use of comma vs. semicolon confusing)
or perhaps use the mathematically equivalent
\[ L_\varepsilon(y,f(x,w)=\max\{0,|y-f(x,w)|-\varepsilon\} \]
casesfrommathtoolspackage ... – Zarko Nov 24 '19 at 18:14