A tensor approach to linear parameter varying system identification