Skip to content

t_lag not correctly used with small datasets #68

@sdevries0

Description

@sdevries0

Hi,

Amazing package!

I was testing PyDaddy with a very low number of datapoints, but the Characterize function throws an error. I think I have found out why.
In _validate_inputs, you check if self.t_lag is larger than the number of data points and update it accordingly:

if self.t_lag >= len(self._X):
			print('Warning : t_lag ({}) is greater that the length of data; setting t_lag as {}\n'.format(
				self.t_lag,
				len(self._data[0]) - 1))
			self.t_lag = len(self._X) - 1

However, in def _get_autocorr_time(self, X, t_lag=1000, update=True) still the default value of t_lag is used, because this function is called with: self._get_autocorr_time(self._M_square).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions