This paper provides estimation and inference methods for a structural function, such as Conditional Average Treatment Effect (CATE), based on modern machine learning (ML) tools. We assume that such function can be represented as a conditional expectation =
of a signal
, where
is the unknown nuisance function. In addition to CATE, examples of such functions include regression function with Partially Missing Outcome and Conditional Average Partial Derivative. We approximate
by a linear form
, where
is a vector of the approximating functions and
is the Best Linear Predictor. Plugging in the first-stage estimate
into the signal
, we estimate
via ordinary least squares of
on
. We deliver a high-quality estimate
of the pseudo-target function
, that features (a) a pointwise Gaussian approximation of
at a point
, (b) a simultaneous Gaussian approximation of
uniformly over x, and (c) optimal rate of convergence of
to
uniformly over x. In the case the misspecication error of the linear form decays sufficiently fast, these approximations automatically hold for the target function
instead of a pseudo-target
. The first stage nuisance parameter
is allowed to be high-dimensional and is estimated by modern ML tools, such as neural networks,
-shrinkage estimators, and random forest. Using our method, we estimate the average price elasticity conditional on income using Yatchew and No (2001) data and provide uniform confidence bands for the target regression function.