Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Expanding Window Features | Section
Engineering Temporal Features

bookExpanding Window Features

Swipe um das Menü anzuzeigen

Expanding window statistics are a powerful tool for extracting cumulative patterns from time series data. Unlike rolling windows, which calculate metrics over a fixed number of recent observations, expanding windows compute statistics from the start of the series up to the current point. This approach is especially useful when you want to capture long-term trends or overall progress, such as cumulative sums, means, or other aggregations that reflect all available information up to each time step. Expanding window features are commonly used in financial analysis to monitor running totals or averages, in process monitoring to track ongoing performance, and in any scenario where the cumulative effect is more meaningful than short-term fluctuations.

1234567891011121314151617
import pandas as pd # Create a sample time series data = {'value': [10, 12, 13, 15, 18, 20]} index = pd.date_range('2023-01-01', periods=6, freq='D') series = pd.Series(data['value'], index=index) # Calculate expanding mean and expanding sum expanding_mean = series.expanding().mean() expanding_sum = series.expanding().sum() print("Original Series:") print(series) print("\nExpanding Mean:") print(expanding_mean) print("\nExpanding Sum:") print(expanding_sum)
copy
question mark

Which scenario best fits the use of expanding window features instead of rolling window features?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 5

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Abschnitt 1. Kapitel 5
some-alt