Nonnegative tensor factorizations using an alternating direction method