Flow-directed PCA for monitoring networks