1. A method for detecting an anomaly in time-series data, comprising: receiving a plurality of time series of original metric data; performing a component analysis to generate a plurality of time series of independent metric data; performing a function to provide coefficients having a varying granularity for the plurality of time series of independent metric data; predicting a value for the independent metric time series data based on the varying granularity coefficients; converting the predicted value for the independent metric time series data to an original metric data value; and determining the actual value of the original metric time series data is an anomaly if the actual value for the metric differs from the predicted value for the metric by more than a threshold.