added SVD training function