Conversation
| import numpy as np | ||
|
|
||
|
|
||
| def to_native_types(obj): |
There was a problem hiding this comment.
What's this for? Do we really need this?
There was a problem hiding this comment.
This converts the NumPy specific values to Python types which makes outputs easier to compare in tests and avoids weird type issues when users consume returned dicts. It also helps avoid type-based failures for our unit tests.
| self._history = history or DataStreamHistory() | ||
|
|
||
| def _append_history_entry(self, entry: DataStreamHistoryEntry) -> None: | ||
| """Append history entry while supporting both legacy and new history formats.""" |
There was a problem hiding this comment.
We might consider just supporting the new format from here on and make a breaking release.
| """ | ||
| Stub for compatibility with legacy test. Returns dummy value. | ||
| """ | ||
| # We could implement a real one if needed; for now, return 0 for all columns. |
There was a problem hiding this comment.
Was this in the original code?
There was a problem hiding this comment.
Yes, it was. Should I remove this function or keep it?
| {column: True if stationary (p<0.05), else False or error message} | ||
| """ | ||
| # Add to history | ||
| entry = DataStreamHistoryEntry( |
There was a problem hiding this comment.
Same comment about history
| @@ -1152,148 +1832,198 @@ def _process_column(self, column_data, estimated_window, method): | |||
| else: | |||
| raise ValueError("Invalid method. Choose 'sliding' or 'non-overlapping'.") | |||
|
|
|||
| def is_stationary(self, columns): | |||
| # ----------- ESS (classic and robust) ---------------- | |||
| def effective_sample_size(self, column_names=None, alpha=0.05): | |||
There was a problem hiding this comment.
This function is very complex, can you refactor it?
… return empty ds, update unit tests
No description provided.