Base class for data. It has two subclasses: the timeseries interface dynts.TimeSeries and dynts.xydata for 2 dimensional data types. An instance of this class contains a dataset of series. Each serie can be seen as an independent entity which, nevertheless, can have close tights with other series in the dataset.
name of data object.
additional information regarding data object.
List of names for series in dataset. It will always return a list or names with length given by dynts.DynData.count.
Number of series in dataset.
Iterator over series in dataset.
Get serie data by column index.
Nicely display self on the shell. Useful during prototyping and development.
A dynts.DynData specialisation for timeseries back-ends. This class expose all the main functionalities of a timeseries
string indicating the backend type (zoo, rmetrics, numpy, etc...)
tuple containing the timeseries dimensions.
Number of series in timeseries.
Return an instance of dynts.utils.wrappers.asbtree which exposes binary tree like functionalities of self.
Return an instance of dynts.utils.wrappers.ashash which exposes hash-table like functionalities of self.
Max values by series
Max values by series
Mean values by series
Median values by series. A median value of a serie is defined as the the numeric value separating the higher half, from the lower half. It is therefore differnt from the TimeSeries.mean() value.
The median of a finite list of numbers can be found by arranging all the observations from lowest value to highest value and picking the middle one.
If there is an even number of observations, then there is no single middle value; the median is then usually defined to be the mean of the two middle values
Calculate returns as delta(log(self)) by series
Returns an iterable over datetime.date instances in the timeseries.
Returns an iterable over raw keys. The keys may be different from dates for same backend implementations.
Returns a numpy.ndarray containing the values of the timeseries. Implementations should try not to copy data if possible. This function can be used to access the timeseries as if it was a matrix.
Returns a python generator which can be used to iterate over dynts.TimeSeries.dates() and dynts.TimeSeries.values() returning a two dimensional tuple (date,value) in each iteration. Similar to the python dictionary items function. The additional input parameter desc can be used to iterate from the greatest to the smallest date in the timeseries by passing ‘’desc=True``
Generator of single series.
Check if the timeseries is consistent
Start date of timeseries
End date of timeseries
Average frequency of dates
The dimensions of the timeseries. This is a two-elements tuple of integers indicating the size of the timeseries and the number of series. A timeseries with 2 series of length 250 will return the tuple:
(250,2)
First order derivative. Optimised.
Parameters: | lag – backward lag |
---|
Second order derivative. Optimised.
Parameters: | lag – backward lag |
---|
Delta in log-space. Used for percentage changes.
Calculate variance of timeseries. Return a vector containing the variances of each series in the timeseries.
Parameters: | ddof – delta degree of freedom, the divisor used in the calculation is given by N - ddof where N represents the length of timeseries. Default 0. |
---|
Calculate standard deviation of timeseries
Apply function func to the timeseries.
Parameters: |
|
---|
A generic rolling function for function func. Same construct as dynts.TimeSeries.apply() but with default window set to 20.
A rolling function for max values. Same as:
self.rollapply('max',**kwargs)
A rolling function for min values. Same as:
self.rollapply('min',**kwargs)
A rolling function for median values. Same as:
self.rollapply('median',**kwargs)
A rolling function for mean values: Same as:
self.rollapply('mean',**kwargs)
A rolling function for stadard-deviation values: Same as:
self.rollapply('sd',**kwargs)
Internal function to create the inner data:
A dynts.DynData class for 2-dimensional series of data with an extra dimension which contain further information for of each x-y pair. For example a date in a timeseries scatter plot.