Multiway clustering of 3-order tensor via affinity matrix