  The Koopman operator has become an essential tool for data-driven
approximation of dynamical (control) systems, e.g., via extended dynamic mode
decomposition. Despite its popularity, convergence results and, in particular,
error bounds are still scarce. In this paper, we derive probabilistic bounds
for the approximation error and the prediction error depending on the number of
training data points; for both ordinary and stochastic differential equations
while using either ergodic trajectories or i.i.d. samples. We illustrate these
bounds by means of an example with the Ornstein-Uhlenbeck process. Moreover, we
extend our analysis to (stochastic) nonlinear control-affine systems. We prove
error estimates for a previously proposed approach that exploits the linearity
of the Koopman generator to obtain a bilinear surrogate control system and,
thus, circumvents the curse of dimensionality since the system is not
autonomized by augmenting the state by the control inputs. To the best of our
knowledge, this is the first finite-data error analysis in the stochastic
and/or control setting. Finally, we demonstrate the effectiveness of the
bilinear approach by comparing it with state-of-the-art techniques showing its
superiority whenever state and control are coupled.
