1. A method of constructing a probabilistic graphical model ( 10 ) of a system from data that includes both normal and anomalous data, the method comprising: learning parameters of a structure for the probabilistic graphical model ( 10 ) wherein the structure includes at least one latent variable ( 26 ) on which other variables ( 12 , 14 , 16 , 18 , 20 , 22 , 24 ) are conditional, and having a plurality of components; iteratively associating one or more of the plurality of components of the latent variable ( 26 ) with normal data; constructing a matrix of the associations; detecting abnormal components of the latent variable ( 26 ) based on one of a low association with the normal data or the matrix of associations; and deleting the abnormal components of the latent variable ( 26 ) from the probabilistic graphical model ( 10 ).