%23%20%2F%2F%2F%20script%0A%23%20requires-python%20%3D%20%22%3E%3D3.11%22%0A%23%20dependencies%20%3D%20%5B%0A%23%20%20%20%20%20%22yohou%5Bplotting%5D%22%2C%0A%23%20%5D%0A%23%20%2F%2F%2F%0A%0Aimport%20marimo%0A%0A__generated_with%20%3D%20%220.23.8%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%0A%20%20%20%20return%20(mo%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20Time-Derived%20Features%0A%0A%20%20%20%20This%20notebook%20demonstrates%20four%20stateless%20transformers%20that%20extract%0A%20%20%20%20features%20from%20the%20%60%22time%22%60%20column.%20Calendar%20and%20holiday%20features%0A%20%20%20%20encode%20temporal%20context%2C%20Fourier%20features%20capture%20cyclical%0A%20%20%20%20seasonality%2C%20and%20time%20index%20features%20model%20trend.%0A%0A%20%20%20%20**Prerequisites%3A**%20Basic%20understanding%20of%20time%20series%20feature%20engineering%20and%20Fourier%20series.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_()%3A%0A%20%20%20%20from%20datetime%20import%20date%0A%0A%20%20%20%20import%20polars%20as%20pl%0A%0A%20%20%20%20from%20yohou.compose%20import%20FeatureUnion%0A%20%20%20%20from%20yohou.datasets%20import%20fetch_sunspot%0A%20%20%20%20from%20yohou.plotting%20import%20plot_time_series%0A%20%20%20%20from%20yohou.preprocessing%20import%20(%0A%20%20%20%20%20%20%20%20CalendarFeatureTransformer%2C%0A%20%20%20%20%20%20%20%20FourierFeatureTransformer%2C%0A%20%20%20%20%20%20%20%20HolidayFeatureTransformer%2C%0A%20%20%20%20%20%20%20%20TimeIndexTransformer%2C%0A%20%20%20%20)%0A%0A%20%20%20%20return%20(%0A%20%20%20%20%20%20%20%20CalendarFeatureTransformer%2C%0A%20%20%20%20%20%20%20%20FeatureUnion%2C%0A%20%20%20%20%20%20%20%20FourierFeatureTransformer%2C%0A%20%20%20%20%20%20%20%20HolidayFeatureTransformer%2C%0A%20%20%20%20%20%20%20%20TimeIndexTransformer%2C%0A%20%20%20%20%20%20%20%20date%2C%0A%20%20%20%20%20%20%20%20fetch_sunspot%2C%0A%20%20%20%20%20%20%20%20pl%2C%0A%20%20%20%20%20%20%20%20plot_time_series%2C%0A%20%20%20%20)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%201.%20Prepare%20Data%0A%0A%20%20%20%20We%20load%20the%20monthly%20sunspot%20series%20for%20the%20calendar%2C%20Fourier%2C%20and%20trend%0A%20%20%20%20sections.%20Later%20we%20create%20a%20short%20daily%20series%20for%20holiday%20features.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(fetch_sunspot%2C%20plot_time_series)%3A%0A%20%20%20%20y%20%3D%20fetch_sunspot().frame.select(%22time%22%2C%20%22sunspot_number%22).drop_nulls()%0A%20%20%20%20plot_time_series(y%2C%20title%3D%22Monthly%20Sunspot%20Number%22)%0A%20%20%20%20return%20(y%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%202.%20CalendarFeatureTransformer%20-%20Auto-detect%0A%0A%20%20%20%20With%20%60features%3DNone%60%20(the%20default)%2C%20the%20transformer%20detects%20the%20data%0A%20%20%20%20interval%20and%20extracts%20all%20applicable%20features.%20For%20monthly%20data%20this%0A%20%20%20%20includes%20%60year%60%2C%20%60month%60%2C%20%60quarter%60%2C%20and%20the%20boolean%20boundary%20flags%2C%0A%20%20%20%20but%20excludes%20sub-daily%20features%20like%20%60hour%60%20and%20%60minute%60.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(CalendarFeatureTransformer%2C%20y)%3A%0A%20%20%20%20cal_tf%20%3D%20CalendarFeatureTransformer()%0A%20%20%20%20cal_tf.fit(y)%0A%20%20%20%20y_cal%20%3D%20cal_tf.transform(y)%0A%20%20%20%20y_cal.head(5)%0A%20%20%20%20return%20cal_tf%2C%20y_cal%0A%0A%0A%40app.cell%0Adef%20_(plot_time_series%2C%20y_cal)%3A%0A%20%20%20%20plot_time_series(%0A%20%20%20%20%20%20%20%20y_cal.head(1000)%2C%0A%20%20%20%20%20%20%20%20title%3D%22Extracted%20Calendar%20Features%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(cal_tf)%3A%0A%20%20%20%20cal_tf.applicable_features_%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%203.%20Select%20Specific%20Features%0A%0A%20%20%20%20Pass%20an%20explicit%20list%20to%20extract%20only%20the%20features%20you%20need.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(CalendarFeatureTransformer%2C%20y)%3A%0A%20%20%20%20cal_specific%20%3D%20CalendarFeatureTransformer(features%3D%5B%22month%22%2C%20%22quarter%22%2C%20%22is_year_start%22%5D)%0A%20%20%20%20cal_specific.fit(y)%0A%20%20%20%20y_specific%20%3D%20cal_specific.transform(y)%0A%20%20%20%20y_specific.head(5)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%204.%20HolidayFeatureTransformer%0A%0A%20%20%20%20%5B%60HolidayFeatureTransformer%60%5D(%2Fpages%2Fapi%2Fgenerated%2Fyohou.preprocessing.calendar.HolidayFeatureTransformer%2F)%20takes%20a%20polars%20DataFrame%20of%20holiday%20dates%0A%20%20%20%20and%20produces%20a%20binary%20indicator%20column.%20The%20holidays%20DataFrame%20must%0A%20%20%20%20have%20a%20%60%22date%22%60%20column%20of%20%60Date%60%20or%20%60Datetime%60%20type.%0A%0A%20%20%20%20We%20create%20a%20short%20daily%20series%20for%20this%20section%20since%20holidays%20are%20most%0A%20%20%20%20meaningful%20at%20daily%20granularity.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(HolidayFeatureTransformer%2C%20date%2C%20pl)%3A%0A%20%20%20%20holidays%20%3D%20pl.DataFrame(%7B%0A%20%20%20%20%20%20%20%20%22date%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20date(2020%2C%201%2C%201)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20date(2020%2C%207%2C%204)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20date(2020%2C%2012%2C%2025)%2C%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%7D)%0A%0A%20%20%20%20X_daily%20%3D%20pl.DataFrame(%7B%0A%20%20%20%20%20%20%20%20%22time%22%3A%20pl.datetime_range(%0A%20%20%20%20%20%20%20%20%20%20%20%20start%3Ddate(2020%2C%201%2C%201)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20end%3Ddate(2020%2C%201%2C%2010)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20interval%3D%221d%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20eager%3DTrue%2C%0A%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%22value%22%3A%20list(range(10))%2C%0A%20%20%20%20%7D)%0A%0A%20%20%20%20hol_tf%20%3D%20HolidayFeatureTransformer(holidays%3Dholidays)%0A%20%20%20%20hol_tf.fit(X_daily)%0A%20%20%20%20X_hol%20%3D%20hol_tf.transform(X_daily)%0A%20%20%20%20X_hol%0A%20%20%20%20return%20X_daily%2C%20holidays%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%205.%20Holiday%20Proximity%20Features%0A%0A%20%20%20%20With%20%60days_to_next%3DTrue%60%20and%20%60days_since_last%3DTrue%60%2C%20the%20transformer%0A%20%20%20%20adds%20columns%20that%20measure%20how%20far%20each%20timestamp%20is%20from%20the%20nearest%0A%20%20%20%20holiday.%20Values%20are%20%60null%60%20when%20no%20next%20or%20previous%20holiday%20exists%0A%20%20%20%20in%20the%20provided%20list.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(HolidayFeatureTransformer%2C%20X_daily%2C%20holidays)%3A%0A%20%20%20%20hol_prox%20%3D%20HolidayFeatureTransformer(holidays%3Dholidays%2C%20days_to_next%3DTrue%2C%20days_since_last%3DTrue)%0A%20%20%20%20hol_prox.fit(X_daily)%0A%20%20%20%20X_prox%20%3D%20hol_prox.transform(X_daily)%0A%20%20%20%20X_prox%0A%20%20%20%20return%20(X_prox%2C)%0A%0A%0A%40app.cell%0Adef%20_(X_prox%2C%20plot_time_series)%3A%0A%20%20%20%20plot_time_series(%0A%20%20%20%20%20%20%20%20X_prox%2C%0A%20%20%20%20%20%20%20%20columns%3D%5B%22holiday_indicator%22%2C%20%22holiday_days_to_next%22%2C%20%22holiday_days_since_last%22%5D%2C%0A%20%20%20%20%20%20%20%20title%3D%22Holiday%20Indicator%20and%20Proximity%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%206.%20FourierFeatureTransformer%20-%20Single%20Seasonality%0A%0A%20%20%20%20Specify%20the%20seasonal%20period%20as%20the%20number%20of%20time%20steps.%20For%20monthly%20data%2C%0A%20%20%20%20a%20yearly%20cycle%20is%20%60seasonality%3D12%60.%20The%20%60harmonics%60%20parameter%20controls%0A%20%20%20%20which%20frequency%20multiples%20to%20include%20-%20%60%5B1%5D%60%20captures%20the%20fundamental%0A%20%20%20%20frequency%2C%20%60%5B1%2C%202%2C%203%5D%60%20adds%20higher%20harmonics%20for%20sharper%20patterns.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(FourierFeatureTransformer%2C%20y)%3A%0A%20%20%20%20fourier_yearly%20%3D%20FourierFeatureTransformer(seasonality%3D12.0%2C%20harmonics%3D%5B1%2C%202%5D)%0A%20%20%20%20fourier_yearly.fit(y)%0A%20%20%20%20y_fourier%20%3D%20fourier_yearly.transform(y)%0A%20%20%20%20y_fourier.head(5)%0A%20%20%20%20return%20(y_fourier%2C)%0A%0A%0A%40app.cell%0Adef%20_(plot_time_series%2C%20y_fourier)%3A%0A%20%20%20%20plot_time_series(%0A%20%20%20%20%20%20%20%20y_fourier.head(1000)%2C%0A%20%20%20%20%20%20%20%20title%3D%22Yearly%20Fourier%20Harmonics%20(period%3D12)%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Notice%20the%20output%20column%20naming%3A%20%60fourier_%7Bseasonality%7D_sin_%7Bk%7D%60%20and%0A%20%20%20%20%60fourier_%7Bseasonality%7D_cos_%7Bk%7D%60%20for%20each%20harmonic%20%60k%60.%20Values%20are%0A%20%20%20%20always%20in%20the%20range%20%5B-1%2C%201%5D.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(pl%2C%20y_fourier)%3A%0A%20%20%20%20y_fourier.select(pl.col(%22%5Efourier_.*%24%22)).describe()%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%207.%20Non-integer%20Seasonality%0A%0A%20%20%20%20The%20%60seasonality%60%20parameter%20accepts%20floats.%20For%20instance%2C%20%60365.25%60%0A%20%20%20%20captures%20a%20yearly%20cycle%20on%20daily%20data%20accounting%20for%20leap%20years.%0A%20%20%20%20The%20sunspot%20cycle%20is%20approximately%20132%20months%20(~11%20years).%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(FourierFeatureTransformer%2C%20pl%2C%20y)%3A%0A%20%20%20%20fourier_solar%20%3D%20FourierFeatureTransformer(seasonality%3D132.0%2C%20harmonics%3D%5B1%2C%202%2C%203%5D)%0A%20%20%20%20fourier_solar.fit(y)%0A%20%20%20%20y_solar%20%3D%20fourier_solar.transform(y)%0A%20%20%20%20y_solar.select(%22time%22%2C%20pl.col(%22%5Efourier_.*%24%22)).head(5)%0A%20%20%20%20return%20(y_solar%2C)%0A%0A%0A%40app.cell%0Adef%20_(plot_time_series%2C%20y_solar)%3A%0A%20%20%20%20plot_time_series(%0A%20%20%20%20%20%20%20%20y_solar.head(1000)%2C%0A%20%20%20%20%20%20%20%20title%3D%22Solar%20Cycle%20Fourier%20Harmonics%20(period%3D132)%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%208.%20Multiple%20Seasonalities%20with%20FeatureUnion%0A%0A%20%20%20%20Use%20%5B%60FeatureUnion%60%5D(%2Fpages%2Fapi%2Fgenerated%2Fyohou.compose.feature_union.FeatureUnion%2F)%20to%20combine%20Fourier%20features%20at%20different%0A%20%20%20%20periods.%20Each%20%5B%60FourierFeatureTransformer%60%5D(%2Fpages%2Fapi%2Fgenerated%2Fyohou.preprocessing.time_features.FourierFeatureTransformer%2F)%20handles%20one%20seasonal%20period%2C%0A%20%20%20%20and%20the%20union%20concatenates%20their%20outputs.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(FeatureUnion%2C%20FourierFeatureTransformer%2C%20y)%3A%0A%20%20%20%20fourier_union%20%3D%20FeatureUnion(%0A%20%20%20%20%20%20%20%20transformer_list%3D%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20(%22yearly%22%2C%20FourierFeatureTransformer(seasonality%3D12.0%2C%20harmonics%3D%5B1%2C%202%5D))%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20(%22solar%22%2C%20FourierFeatureTransformer(seasonality%3D132.0%2C%20harmonics%3D%5B1%5D))%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20)%0A%20%20%20%20fourier_union.fit(y)%0A%20%20%20%20y_multi%20%3D%20fourier_union.transform(y)%0A%20%20%20%20y_multi.head(5)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%209.%20TimeIndexTransformer%20-%20Linear%20Index%0A%0A%20%20%20%20%5B%60TimeIndexTransformer%60%5D(%2Fpages%2Fapi%2Fgenerated%2Fyohou.preprocessing.time_features.TimeIndexTransformer%2F)%20converts%20the%20time%20column%20into%20a%20sequential%20integer%0A%20%20%20%20index%20starting%20at%200.%20This%20is%20useful%20as%20a%20trend%20feature%20for%0A%20%20%20%20reduction%20forecasters.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(TimeIndexTransformer%2C%20y)%3A%0A%20%20%20%20idx_tf%20%3D%20TimeIndexTransformer()%0A%20%20%20%20idx_tf.fit(y)%0A%20%20%20%20y_idx%20%3D%20idx_tf.transform(y)%0A%20%20%20%20y_idx.select(%22time%22%2C%20%22time_index%22).head(5)%0A%20%20%20%20return%20(y_idx%2C)%0A%0A%0A%40app.cell%0Adef%20_(plot_time_series%2C%20y_idx)%3A%0A%20%20%20%20plot_time_series(%0A%20%20%20%20%20%20%20%20y_idx.head(1000)%2C%0A%20%20%20%20%20%20%20%20title%3D%22Time%20Index%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2010.%20Normalized%20and%20Polynomial%20Index%0A%0A%20%20%20%20With%20%60normalize%3DTrue%60%2C%20the%20index%20is%20scaled%20to%20%5B0%2C%201%5D%20based%20on%20the%20fit%0A%20%20%20%20data%20length.%20The%20%60degree%60%20parameter%20adds%20polynomial%20terms%20for%0A%20%20%20%20non-linear%20trend%20modeling.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(TimeIndexTransformer%2C%20y)%3A%0A%20%20%20%20poly_tf%20%3D%20TimeIndexTransformer(normalize%3DTrue%2C%20degree%3D3)%0A%20%20%20%20poly_tf.fit(y)%0A%20%20%20%20y_poly%20%3D%20poly_tf.transform(y)%0A%20%20%20%20y_poly.select(%22time%22%2C%20%22time_index%22%2C%20%22time_index_2%22%2C%20%22time_index_3%22).head(5)%0A%20%20%20%20return%20(y_poly%2C)%0A%0A%0A%40app.cell%0Adef%20_(plot_time_series%2C%20y_poly)%3A%0A%20%20%20%20plot_time_series(%0A%20%20%20%20%20%20%20%20y_poly.head(1000)%2C%0A%20%20%20%20%20%20%20%20title%3D%22Normalized%20Polynomial%20Time%20Index%20(degree%3D3)%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Notice%20that%20%60time_index%60%20is%20%60Float64%60%20when%20normalized%20(instead%20of%20%60Int64%60)%2C%0A%20%20%20%20and%20polynomial%20columns%20are%20always%20%60Float64%60.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(y_poly)%3A%0A%20%20%20%20y_poly.select(%22time_index%22%2C%20%22time_index_2%22%2C%20%22time_index_3%22).describe()%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2011.%20Combining%20All%20with%20FeatureUnion%0A%0A%20%20%20%20Combine%20calendar%2C%20Fourier%2C%20and%20time%20index%20transformers%20into%20a%20single%0A%20%20%20%20%5B%60FeatureUnion%60%5D(%2Fpages%2Fapi%2Fgenerated%2Fyohou.compose.feature_union.FeatureUnion%2F)%20pipeline.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(%0A%20%20%20%20CalendarFeatureTransformer%2C%0A%20%20%20%20FeatureUnion%2C%0A%20%20%20%20FourierFeatureTransformer%2C%0A%20%20%20%20TimeIndexTransformer%2C%0A%20%20%20%20y%2C%0A)%3A%0A%20%20%20%20full_union%20%3D%20FeatureUnion(%0A%20%20%20%20%20%20%20%20transformer_list%3D%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20(%22calendar%22%2C%20CalendarFeatureTransformer(features%3D%5B%22month%22%2C%20%22quarter%22%5D))%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20(%22fourier_12%22%2C%20FourierFeatureTransformer(seasonality%3D12.0%2C%20harmonics%3D%5B1%2C%202%5D))%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20(%22fourier_132%22%2C%20FourierFeatureTransformer(seasonality%3D132.0%2C%20harmonics%3D%5B1%5D))%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20(%22trend%22%2C%20TimeIndexTransformer(normalize%3DTrue%2C%20degree%3D2))%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20)%0A%20%20%20%20full_union.fit(y)%0A%20%20%20%20y_full%20%3D%20full_union.transform(y)%0A%20%20%20%20y_full.head(5)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Next%20Steps%0A%0A%20%20%20%20-%20**Window%20transformers**%3A%20See%20%5B%60window_transformers.py%60%5D(%2Fexamples%2Fdata-features%2Fwindow_transformers%2F)%20for%20lag%2C%20rolling%2C%20and%20EMA%20features%0A%20%20%20%20-%20**Custom%20transforms**%3A%20See%20%5B%60function_transformer.py%60%5D(%2Fexamples%2Fdata-features%2Ffunction_transformer%2F)%20for%20wrapping%20arbitrary%20polars%20operations%0A%20%20%20%20-%20**Using%20in%20forecasters**%3A%20Pass%20to%20%60feature_transformer%60%20in%20%5B%60PointReductionForecaster%60%5D(%2Fpages%2Fapi%2Fgenerated%2Fyohou.point.reduction.PointReductionForecaster%2F)%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
81c0e3cc2e0566ad5797b4fe43f7ef71