What happened + What you expected to happen
The heterogeneity function is currently broken. The function returns NaN values for all outputs (arch_acf, garch_acf, arch_r2, garch_r2).
Root Cause:
The function uses statsmodels.tsa.ar_model.AR, which was deprecated and then removed in statsmodels 0.14.0. It has been replaced with statsmodels.tsa.ar_model.AutoReg with a different API.
Current behavior:
from tsfeatures import heterogeneity
import numpy as np
data = np.random.randn(500)
result = heterogeneity(data)
# Returns: {'arch_acf': nan, 'garch_acf': nan, 'arch_r2': nan, 'garch_r2': nan}
Versions / Dependencies
Python3.11
macOS: 15.4.1
tsfeatures: 0.4.5
Reproduction script
Current behavior:
from tsfeatures import heterogeneity
import numpy as np
data = np.random.randn(500)
result = heterogeneity(data)
# Returns: {'arch_acf': nan, 'garch_acf': nan, 'arch_r2': nan, 'garch_r2': nan}
Issue Severity
High: It blocks me from completing my task.
What happened + What you expected to happen
The heterogeneity function is currently broken. The function returns NaN values for all outputs (arch_acf, garch_acf, arch_r2, garch_r2).
Root Cause:
The function uses statsmodels.tsa.ar_model.AR, which was deprecated and then removed in statsmodels 0.14.0. It has been replaced with statsmodels.tsa.ar_model.AutoReg with a different API.
Current behavior:
Versions / Dependencies
Python3.11
macOS: 15.4.1
tsfeatures: 0.4.5
Reproduction script
Current behavior:
Issue Severity
High: It blocks me from completing my task.