I am trying to get this repo of Xu's DONUT algorithm running, however I am getting an error I do not quite understand. The readme says I should load raw_data as follows:
timestamp, values, labels = ... # If there is no label, simply use all zeros. labels = np.zeros_like(values, dtype=np.int32) # Complete the timestamp, and obtain the missing point indicators. timestamp, missing, (values, labels) = \ complete_timestamp(timestamp, (values, labels))
however, when I do so, I get this error:
ValueError: The shape of ``arrays[0]`` does not agree with the shape of `timestamp` ((109577, 11) vs (109577,))
which does not make sense to me as I can't think of a reason timestamp would be an 11 dim array. When I pass the values as the timestamp arg, I get "timestamp must be a 1D array"
Very confused, hopefully, someone can shed some light.
Here are the checks in the code:
if len(timestamp.shape) != 1: raise ValueError('`timestamp` must be a 1-D array') has_arrays = arrays is not None arrays = [np.asarray(array) for array in (arrays or ())] for i, array in enumerate(arrays): if array.shape != timestamp.shape: raise ValueError('The shape of ``arrays[{}]`` does not agree with ' 'the shape of `timestamp` ({} vs {})'. format(i, array.shape, timestamp.shape))
As well as the repo itself: https://github.com/haowen-xu/donut