\begin{algorithm}[!t]
\caption{Linear Regressor}
\label{alg:linear_regressor}
\begin{algorithmic}[1]
\STATE \textbf{Input:} data distribution $\mathcal{D}$, scoring function $f$, loss function $L$
\STATE Set 
\[
    \hat{\lambda} = 
    \argmin_{\lambda}
    \mathbb{E}_{(X,Y) \sim \mathcal{D}} \left[ L\left( f(X; \lambda), Y \right) \right]
\]
s.t. $f(X; \lambda) = \lambda_0 + \lambda_1 f(X)$
\STATE \textbf{Output:}$f(X; \hat{\lambda})$
\end{algorithmic}
\end{algorithm}

\begin{algorithm}[!t]
\caption{Group-conditional Linear Regressor}
\label{alg:group_regressor}
\begin{algorithmic}[1]
\STATE \textbf{Input:} data distribution $\mathcal{D}$, scoring function $f$, loss function $L$, set of groups $\mathcal{G}$
\STATE Set 
\[
    \hat{\lambda} = 
    \argmin_{\lambda}
    \mathbb{E}_{(X,Y) \sim \mathcal{D}} \left[ L\left( f(X;\lambda), Y \right) \right]
\]
s.t. $f(X; \lambda) = \lambda_0 + \lambda_1 f(X) + \sum_{\lambda_g \in \mathcal{G}} \lambda_g g(x)$
\STATE \textbf{Output:}$f(X; \hat{\lambda})$
\end{algorithmic}
\end{algorithm}