%----------------------------------------------------------------
\usepackage{amsmath,amsthm,amssymb,amsfonts,multicol,IEEEtrantools}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{float}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage[framemethod=default,
	splittopskip=1.5\topsep]{mdframed}
\usepackage[a4paper,vmargin=3.5cm,left=3cm,right=4cm]{geometry}
\usepackage[colorlinks=true,
	linkcolor=blue!30!black, citecolor=blue!30!black]
	{hyperref}
\usepackage{glossaries}
\usepackage{subcaption}
\usepackage{mathabx}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.9}
\belowdisplayskip=1pt plus 1pt minus 1pt
\belowdisplayshortskip=1pt plus 1pt minus 1pt
%----------------------------------------------------------------

%----------------------------------------------------------------
\usepackage{xepersian}
\settextfont[Scale=1.1]{XB Niloofar}
\setdigitfont[Scale=1.1]{Arial}
\setlatintextfont[Scale=1]{Euclid}
%\defpersianfont\Nastaliq[Scale=1.5]{IranNastaliq}
%\defpersianfont\Titre[Scale=1]{XB Titre}
\def\d{\displaystyle}
\def\term{\mathrm{term}}
\allowdisplaybreaks
%=================================================
\theoremstyle{plain} 
\newtheorem{theorem}{قضیه}[chapter]
\newtheorem{lemma}{لم}[chapter]
\newtheorem{proposition}{گزاره}[chapter]
\newtheorem{corollary}{نتیجه}[chapter]
\newtheorem*{conjecture}{حدس}

\theoremstyle{definition}
\newtheorem{definition}{تعریف}[chapter]
\newmdenv[skipabove=3pt,
skipbelow=3pt,
rightline=true,
leftline=false,
topline=false,
bottomline=false,
backgroundcolor=white,
linecolor=white,
innerleftmargin=12pt,
innerrightmargin=15pt,
innertopmargin=5pt,
innerbottommargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=2pt]{defBox}
\newenvironment{تعریف}{\begin{definition}}{\end{definition}}



\newenvironment{قضیه}{\begin{theorem}}{\end{theorem}}

\newenvironment{لم}{\begin{lemma}}{\end{lemma}}}

\newenvironment{نتیجه}{\begin{corollary}}{\end{corollary}}

\newenvironment{اثبات}{\begin{proof}}{\end{proof}}

\newenvironment{گزاره}{\begin{proposition}}{\end{proposition}}

\newenvironment{ملاحظه}{\begin{remark}}{\end{remark}}
\newtheorem{example}{مثال}[chapter]
\newtheorem{prob}{مساله}[chapter]
\theoremstyle{remark} 
\newtheorem{remark}{ملاحظه}[chapter]
%==================================================
\setcounter{secnumdepth}{3}
%\setcounter{chapter}{4}
\renewcommand{\bibname}{مراجع}
\oddsidemargin =0cm 
\evensidemargin =0cm
\textheight =21cm
\textwidth= 15.3cm
\headsep= 1.2cm
\topmargin  =0cm
\usepackage{perpage}
%\setcounter{chapter}{3}
\MakePerPage{footnote}


% USEFUL COMMANDS
\newcommand{\blankpage}{\thispagestyle{empty}
\begin{center}%
\textit{این صفحه تعمداً خالی گذاشته شده است}%
\end{center}
\clearpage
}

%\baselineskip = 1cm
%\renewcommand{\baselinestretch}{1.9}

%\فرمان‌نو{\outcome}{برآمد}
%\فرمان‌نو{\response}{پاسخ}
%\فرمان‌نو{\predictor}{پیشگو}
%\فرمان‌نو{\feature}{ویژگی}
%\فرمان‌نو{\features}{ویژگی‌ها}
%\فرمان‌نو{\training}{آموزشی}
%\فرمان‌نو{\trainingSet}{مجموعه‌ی \training}
%\فرمان‌نو{\leastSquares}{کمترین مربعات}
%\فرمان‌نو{\fit}{برازش}
%\فرمان‌نو{\RSS}{مجموع مربعات مانده‌ها}
%\فرمان‌نو{\lossFunction}{تابع زیان}
%\فرمان‌نو{\squaredError}{مربع خطا}
%\فرمان‌نو{\prediction}{پیشگویی}
%\فرمان‌نو{\predictionError}{خطای پیشگویی}
%\فرمان‌نو{\EPE}{خطای پیشگویی مورد انتظار}
%\فرمان‌نو{\MSPE}{خطای پیشگویی میانگین مربعات}
%\فرمان‌نو{\regression}{رگرسیون}
%\فرمان‌نو{\linearRegression}{رگرسیون خطی}
%\فرمان‌نو{\bias}{اریبی}
%\فرمان‌نو{\variance}{واریانس}
%\فرمان‌نو{\interpretable}{تعبیرپذیر}
%\فرمان‌نو{\subsetSelection}{زیرمجموعه‌گزینی}
%\فرمان‌نو{\shrinkage}{انقباض}
%\فرمان‌نو{\ridge}{ستیغی}
%\فرمان‌نو{\ridgeRegression}{رگرسیون ستیغی}
%\فرمان‌نو{\penaltyy}{تاوان}
%\فرمان‌نو{\SVD}{تجزیه‌ی مقدار تکین}
%\فرمان‌نو{\lasso}{لسو}
%\فرمان‌نو{\sparse}{تنک}
%\فرمان‌نو{\consistency}{سازگاری}
%\فرمان‌نو{\consistent}{سازگار}
%\فرمان‌نو{\crossvalidation}{اعتبار سنجی متقابل}
%\فرمان‌نو{\designmatrix}{ماتریس طرح}

%\فرمان‌نو{\kNN}
%{$k$مین نزدیک‌ترین همسایه}

%\فرمان‌نو{\معرفی}[2]{\موکد{#1}\پانوشت{\متن‌لاتین{#2}}}

%\فرمان‌نو{\دنباله}[2]{#1،$\cdots$ و #2}

\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\MSPEO}{MSPE}
\DeclareMathOperator{\sgn}{sgn}

\newcommand{\Normal}[2]{N(#1,#2)}
\newcommand{\Norm}[1]{\lVert #1\rVert}

\newcommand{\heps}{\hat{\varepsilon}}
\newcommand{\hbeta}{\hat{\beta}}
\newcommand{\hsigma}{\hat{\sigma}}
\newcommand{\hby}{\hat{\by}}
\newcommand{\hbY}{\hat{\bY}}
\newcommand{\hy}{\hat{y}}
\newcommand{\hY}{\hat{Y}}
\newcommand{\hx}{\hat{x}}
\newcommand{\hX}{\hat{X}}
\newcommand{\hf}{\hat{f}}
\newcommand{\hK}{\hat{K}}
\newcommand{\hmu}{\hat{\mu}}
\newcommand{\hMSPEO}{\widehat{\MSPEO}}

\newcommand{\bZ}{\mathbf{Z}}
\newcommand{\bz}{\mathbf{z}}
\newcommand{\bX}{\mathbf{X}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\bY}{\mathbf{Y}}
\newcommand{\by}{\mathbf{y}}
\newcommand{\bI}{\mathbf{I}}
\newcommand{\bD}{\mathbf{D}}
\newcommand{\bU}{\mathbf{U}}
\newcommand{\bu}{\mathbf{u}}
\newcommand{\bV}{\mathbf{V}}

\newcommand{\tbeta}{\tilde{\beta}}
\newcommand{\tbbeta}{\boldsymbol{\tilde{\beta}}}
\newcommand{\tby}{\tilde{\by}}
\newcommand{\tbY}{\tilde{\bY}}

\newcommand{\tY}{\tilde{Y}}
\newcommand{\ty}{\tilde{y}}

\newcommand{\IR}{\mathbb{R}}
\newcommand{\IN}{\mathbb{N}}
\newcommand{\IP}{\mathbb{P}}
\newcommand{\IE}{\mathbb{E}}
\newcommand{\IB}{\mathbb{B}}
\newcommand{\ID}{\mathbb{D}}

\newcommand{\CK}{\mathcal{K}}

\newcommand{\argminu}{\underset{u}{\argmin}}

\newcommand{\Wbar}{\widebar{W}}
\newcommand{\Warc}{\widecheck{W}}
\newcommand{\Varc}{\widecheck{V}}