Tensor Networks for Dimensionality Reduction and Large-scale Optimization