  In this paper we propose an efficient method to compress a high dimensional
function into a tensor ring format, based on alternating least-squares (ALS).
Since the function has size exponential in $d$ where $d$ is the number of
dimensions, we propose efficient sampling scheme to obtain $O(d)$ important
samples in order to learn the tensor ring. Furthermore, we devise an
initialization method for ALS that allows fast convergence in practice.
Numerical examples show that to approximate a function with similar accuracy,
the tensor ring format provided by the proposed method has less parameters than
tensor-train format and also better respects the structure of the original
function.
