클라이언트별 통계 모델 적합
읽는 데 약 41분분 걸린다, 10절에 6개 예제이(가) 있음.
AI로 번역함. 영어 원문을 사람이 검증함. 우리가 책을 만드는 방식
영어판 2026.11.11판을 번역한 것이다. 원문 읽기
여기서는 같은 백테스트에서 클라이언트마다 AutoETS와 고정 계절 ARIMA를 적합하고, 두 모델을 계절 나이브와 비교해 점수를 매기며, 늦게 시작한 클라이언트를 그 클라이언트의 첫 측정값부터 시작하는 방법을 배운다. 이 장은 앞선 두 장의 기준선과 백테스트를 전제로 한다.
공급업체의 각 클라이언트에는 저마다 하루 앞 예측이 필요하다. 2장의 계절 나이브는 모든 클라이언트에 같은 답, 곧 어제 같은 시각의 값을 내놓는다. 이 규칙은 클라이언트의 수준도 추세도 추정하지 않는데, 클라이언트들은 두 가지 모두에서 서로 다르다. 그래서 이 장에서는 클라이언트마다 통계 모델을 적합하고, 추가로 들이는 작업이 그만한 값을 하는지 묻는다.
이 부분은 아직 번역되지 않았으므로 영어로 표시된다.
Why a statistical model comes next
Chapter 2 set the bar. Seasonal naive forecasts each hour as the same hour yesterday, and the scaled error, MASE, compares clients with different loads on one scale. Chapter 3 backtested that forecast over many cutoffs. A cutoff is the time a forecast is made, and its history ends there. A window is one cutoff and the 24 hours after it, which is the horizon. Each window's history ends at its cutoff, so no hour is forecast with data from its own day.
A statistical model adds to that loop. A series has a state. The level of a series is its typical reading, the trend is the slow drift of the level, the season is the daily shape of the load, and what none of these explain is error. A statistical model holds an estimate of each part of the state of a series, updates the estimates as each reading arrives, and projects them over the horizon. Seasonal naive has no such state. It copies yesterday, so it gets a client's level only as well as yesterday did.
A per-client model is one fit for each client, on that client's history alone, so the cost is one fit per client per window. The subset this chapter uses, SUBSET8, has eight clients. Over the book's three standard cutoffs, Dec 29 to Dec 31, 2014, the last three days of the held-out week and the windows every later chapter reports, that is 24 fits for each model. The code runs the fits in one worker (n_jobs=1), which keeps the output identical from run to run. Every model in this chapter gets the same three cutoffs and the same 1,344 hours of history before each one. The cutoffs fall in the held-out week, and the subset holds the one late starter a later section needs.
Working rule: Fit one model per client only after a baseline and a backtest are in place. Count the fits before you choose the number of windows: clients, times windows, times refits if you run the model every day. Use the same cutoffs and history for every model in a comparison. Otherwise the comparison measures the windows, not the models.
이 부분은 아직 번역되지 않았으므로 영어로 표시된다.
Fit exponential smoothing
Seasonal naive keeps only yesterday, so the first candidate keeps a level instead. Exponential smoothing moves its level toward each new reading. The simplest form updates the level as level_t = alpha * y_t + (1 - alpha) * level_(t-1). The constant alpha, between 0 and 1, sets how fast the level follows the data. The forecast for every hour of the horizon is the last level. Recent readings count for more than older ones, and the weights fall off with age.
ETS, for error, trend and season, extends the simplest form of exponential smoothing. Each part is chosen from a short list. The trend can be none, additive or damped. The error can be additive or multiplicative, and the season can be none, additive or multiplicative. A name such as ETS(A,N,A) reads in that order: additive error, no trend, additive season. ETS(M,Ad,M) has a multiplicative error, a damped trend and a multiplicative season.
AutoETS chooses the ETS form for you. Its default criterion is AICc, the corrected Akaike information criterion, which charges a model for each parameter and corrects for small samples, as the AutoETS docstring in statsforecast 2.1.1 (statsforecast/models.py) says. Two of its defaults matter for hourly demand. The season length defaults to 1, which means no season at all, and the model gives no warning when you leave it that way. The model argument defaults to "ZZZ", which lets the model choose all three parts. For hourly demand with a daily pattern, the call sets season_length=24.
Which form does AutoETS pick for each client, and do its forecasts beat seasonal naive? The lines it prints answer both.
1"""Backtest AutoETS and seasonal naive for the eight clients of SUBSET8 over the three standard cutoffs, and score both.2The fits lines count the forms AutoETS chose, and the MASE and coverage lines are the scores the comparison table quotes."""3from collections import Counter, defaultdict45import numpy as np6import pandas as pd7from statsforecast import StatsForecast8from statsforecast.models import AutoETS, SeasonalNaive910from lib.scoring import book_scale11from lib.electricity import load12from lib.quirks import filled_history, mask_clock_changes13from lib.settings import EVAL_CUTOFFS, HORIZON, SEED, SUBSET8, show14from lib.subsets import score_clients, show_client_lines15np.random.seed(SEED) # the seed from lib/settings.py, set before any fit16masked = mask_clock_changes(load(SUBSET8)) # clock-change hours become NaN, so they are never scored; filled_history fills them from their neighbours before each fit17scale = book_scale(load(SUBSET8), EVAL_CUTOFFS[0]) # MASE scale: rows before the first cutoff, from each client's first reading18# season_length=24 for hourly demand; the default of 1 would mean no season at all. n_jobs=1 keeps the output the same from run to run.19sf = StatsForecast(models=[AutoETS(season_length=24), SeasonalNaive(season_length=24)], freq="h", n_jobs=1)20parts, forms, by_client = [], Counter(), defaultdict(list)21for c in pd.to_datetime(EVAL_CUTOFFS):22 sf.fit(df=filled_history(masked, c)[["unique_id", "ds", "y"]]) # the eight weeks before c, clock hours filled from them23 part = sf.predict(h=HORIZON, level=[95]) # level=[95] asks for the 95% interval the coverage line scores24 # the first forecast hour must be the cutoff itself, or the window is misaligned25 if part["ds"].min() != c:26 raise ValueError(f"forecast for {c:%Y-%m-%d} does not start at the cutoff")27 parts.append(part)28 for i, uid in enumerate(sf.uids):29 form = sf.fitted_[i, 0].model_["method"] # model 0 is AutoETS; its method name is the form, such as ETS(A,N,A)30 forms[form] += 131 by_client[uid].append(form)32forecasts = pd.concat(parts, ignore_index=True)33summary, per_client = score_clients(forecasts, masked, ["AutoETS", "SeasonalNaive"], scale, interval_model="AutoETS")34show("horizon hours", HORIZON)35show("windows", len(parts))36for form, n in sorted(forms.items()):37 show(f"fits that chose {form}", n)38# the form reads ETS(error,trend,season): a multiplicative part is an M in any of the three slots39show("fits with a multiplicative part", sum(n for form, n in forms.items() if "M" in form[4:-1].split(",")))40for label, value in summary.items():41 show(label, value, digits=3 if label.startswith("coverage") else 2) # coverage is a share, to three decimals; the rest are kWh or ratios42show("clients where AutoETS has lower MASE", int((per_client["AutoETS"] < per_client["SeasonalNaive"]).sum()))43show_client_lines(by_client, per_client, ["AutoETS", "SeasonalNaive"])
python autoets-subset-backtest.pyhorizon hours: 24
windows: 3
fits that chose ETS(A,Ad,A): 1
fits that chose ETS(A,N,A): 8
fits that chose ETS(A,N,N): 9
fits that chose ETS(M,Ad,M): 2
fits that chose ETS(M,N,A): 3
fits that chose ETS(M,N,M): 1
fits with a multiplicative part: 6
clients: 8
scored hours per client: 72
MAE AutoETS: 362.11
RMSE AutoETS: 537.20
MASE AutoETS: 1.30
MAE SeasonalNaive: 423.68
RMSE SeasonalNaive: 591.25
MASE SeasonalNaive: 1.16
coverage 95 AutoETS: 0.910
clients where AutoETS has lower MASE: 4
forms MT_014, one per cutoff: ETS(A,N,N) ETS(A,N,N) ETS(A,N,N)
MASE MT_014 AutoETS: 1.18
MASE MT_014 SeasonalNaive: 0.97
forms MT_064, one per cutoff: ETS(A,N,N) ETS(A,N,N) ETS(A,N,N)
MASE MT_064 AutoETS: 2.32
MASE MT_064 SeasonalNaive: 1.08
forms MT_115, one per cutoff: ETS(M,N,A) ETS(M,N,A) ETS(M,N,A)
MASE MT_115 AutoETS: 0.95
MASE MT_115 SeasonalNaive: 1.31
forms MT_166, one per cutoff: ETS(A,Ad,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_166 AutoETS: 1.18
MASE MT_166 SeasonalNaive: 1.29
forms MT_217, one per cutoff: ETS(M,N,M) ETS(M,Ad,M) ETS(M,Ad,M)
MASE MT_217 AutoETS: 1.76
MASE MT_217 SeasonalNaive: 1.25
forms MT_268, one per cutoff: ETS(A,N,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_268 AutoETS: 0.94
MASE MT_268 SeasonalNaive: 0.89
forms MT_319, one per cutoff: ETS(A,N,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_319 AutoETS: 1.11
MASE MT_319 SeasonalNaive: 1.26
forms MT_370, one per cutoff: ETS(A,N,N) ETS(A,N,N) ETS(A,N,N)
MASE MT_370 AutoETS: 0.96
MASE MT_370 SeasonalNaive: 1.25
The chosen form changes from client to client, and for some clients from one cutoff to the next. Across the 24 fits, AutoETS chose ETS(A,N,N), with no season, for 9 of them, and ETS(A,N,A), with an additive season, for 8. ETS(A,Ad,A), a damped trend with an additive season, came up in 1 of the fits. The other fits used a multiplicative part, in the error, the season or both. The lines under the totals give each client's three forms. Three clients, MT_014, MT_064 and MT_370, take the flat form at all three cutoffs. MT_014 is the lead client, the one Chapter 1 met.
A flat form winning looks odd when the seasonal form contains it. ETS(A,N,N) is ETS(A,N,A) with the seasonal part switched off, so the best seasonal fit cannot have a lower likelihood than the flat fit on the same history. Fitting both forms on each of the 24 windows shows whether that happens.
1"""For each subset window, fit the flat form ETS(A,N,N) and the additive-season form ETS(A,N,A) on the same history, and count where the seasonal fit has the lower likelihood.2The two counts printed last are the ones the prose quotes."""3import numpy as np4import pandas as pd5from statsforecast import StatsForecast6from statsforecast.models import AutoETS78from lib.electricity import load9from lib.quirks import filled_history, mask_clock_changes10from lib.settings import EVAL_CUTOFFS, SEED, SUBSET8, show1112np.random.seed(SEED) # the seed from lib/settings.py, set before any fit13masked = mask_clock_changes(load(SUBSET8))14windows = seasonal_lower_loglik = seasonal_higher_aicc = 015for c in pd.to_datetime(EVAL_CUTOFFS):16 hist = filled_history(masked, c)[["unique_id", "ds", "y"]]17 # ANN is additive error, no trend, no season: the flat form. ANA is the same with an additive season.18 sf = StatsForecast(models=[AutoETS(model="ANN", season_length=24, alias="flat"),19 AutoETS(model="ANA", season_length=24, alias="seasonal")], freq="h", n_jobs=1)20 sf.fit(df=hist)21 for i in range(len(sf.uids)):22 flat = sf.fitted_[i, 0].model_ # models are fitted in the order listed: 0 is the flat fit23 seasonal = sf.fitted_[i, 1].model_ # 1 is the seasonal fit24 windows += 125 # ANA contains ANN, so a lower seasonal likelihood points to a fit that stopped short of its best26 seasonal_lower_loglik += int(seasonal["loglik"] < flat["loglik"])27 # AICc charges each parameter, so this count can differ from the likelihood count28 seasonal_higher_aicc += int(seasonal["aicc"] > flat["aicc"])29show("windows", windows)30show("seasonal fit has the lower log-likelihood", seasonal_lower_loglik)31show("seasonal fit has the higher AICc", seasonal_higher_aicc)
python flat-form-check.pywindows: 24
seasonal fit has the lower log-likelihood: 9
seasonal fit has the higher AICc: 9
The seasonal fit loses on likelihood, not only on AICc. Its log-likelihood is lower in 9 of the 24 windows, and its AICc is higher in 9. Those are the same nine windows in which the default run chose the flat form. AICc charges a model for each parameter, and the seasonal form has 24 more. That charge adds to the gap; it does not cause it, because the seasonal fit's likelihood is already lower before any charge. The seasonal fit most likely stopped short of its best value, and the flat form won by default. The book does not chase the optimiser; it tests the choice with a forced season.
Chapter 1 forced an additive season on the lead client, with model="ZZA", and seasonal naive still had the lower error there. Does that hold across all eight? The forced run covers the same eight clients, beside the default.
1"""Backtest AutoETS with the season forced to additive (model ZZA) and seasonal naive, for the eight clients of SUBSET8 over the three standard cutoffs.2The ZZA lines are the forced-season scores that the comparison table and the forced-season paragraph quote."""3from collections import Counter, defaultdict45import numpy as np6import pandas as pd7from statsforecast import StatsForecast8from statsforecast.models import AutoETS, SeasonalNaive910from lib.scoring import book_scale11from lib.electricity import load12from lib.quirks import filled_history, mask_clock_changes13from lib.settings import EVAL_CUTOFFS, HORIZON, SEED, SUBSET8, show14from lib.subsets import score_clients, show_client_lines15np.random.seed(SEED) # the seed from lib/settings.py, set before any fit16masked = mask_clock_changes(load(SUBSET8)) # clock-change hours become NaN, so they are never scored; filled_history fills them from their neighbours before each fit17scale = book_scale(load(SUBSET8), EVAL_CUTOFFS[0]) # MASE scale: rows before the first cutoff, from each client's first reading18# ZZA: Z lets the model choose the error and the trend, A forces an additive season. alias names the output columns.19sf = StatsForecast(models=[AutoETS(model="ZZA", season_length=24, alias="ZZA"), SeasonalNaive(season_length=24)],20 freq="h", n_jobs=1)21parts, forms, by_client = [], Counter(), defaultdict(list)22for c in pd.to_datetime(EVAL_CUTOFFS):23 sf.fit(df=filled_history(masked, c)[["unique_id", "ds", "y"]]) # the eight weeks before c, clock hours filled from them24 part = sf.predict(h=HORIZON, level=[95]) # level=[95] asks for the 95% interval the coverage line scores25 # the first forecast hour must be the cutoff itself, or the window is misaligned26 if part["ds"].min() != c:27 raise ValueError(f"forecast for {c:%Y-%m-%d} does not start at the cutoff")28 parts.append(part)29 for i, uid in enumerate(sf.uids):30 form = sf.fitted_[i, 0].model_["method"] # model 0 is the forced AutoETS; its method name is the form31 forms[form] += 132 by_client[uid].append(form)33forecasts = pd.concat(parts, ignore_index=True)34summary, per_client = score_clients(forecasts, masked, ["ZZA", "SeasonalNaive"], scale, interval_model="ZZA")35show("horizon hours", HORIZON)36show("windows", len(parts))37for form, n in sorted(forms.items()):38 show(f"fits that chose {form}", n)39for label, value in summary.items():40 show(label, value, digits=3 if label.startswith("coverage") else 2)41show("clients where ZZA has lower MASE", int((per_client["ZZA"] < per_client["SeasonalNaive"]).sum()))42show_client_lines(by_client, per_client, ["ZZA", "SeasonalNaive"])
python autoets-forced-season-backtest.pyhorizon hours: 24
windows: 3
fits that chose ETS(A,Ad,A): 1
fits that chose ETS(A,N,A): 17
fits that chose ETS(M,N,A): 6
clients: 8
scored hours per client: 72
MAE ZZA: 365.24
RMSE ZZA: 553.11
MASE ZZA: 1.17
MAE SeasonalNaive: 423.68
RMSE SeasonalNaive: 591.25
MASE SeasonalNaive: 1.16
coverage 95 ZZA: 0.925
clients where ZZA has lower MASE: 4
forms MT_014, one per cutoff: ETS(A,N,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_014 ZZA: 1.08
MASE MT_014 SeasonalNaive: 0.97
forms MT_064, one per cutoff: ETS(A,N,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_064 ZZA: 1.27
MASE MT_064 SeasonalNaive: 1.08
forms MT_115, one per cutoff: ETS(M,N,A) ETS(M,N,A) ETS(M,N,A)
MASE MT_115 ZZA: 0.95
MASE MT_115 SeasonalNaive: 1.31
forms MT_166, one per cutoff: ETS(A,Ad,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_166 ZZA: 1.18
MASE MT_166 SeasonalNaive: 1.29
forms MT_217, one per cutoff: ETS(M,N,A) ETS(M,N,A) ETS(M,N,A)
MASE MT_217 ZZA: 1.78
MASE MT_217 SeasonalNaive: 1.25
forms MT_268, one per cutoff: ETS(A,N,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_268 ZZA: 0.94
MASE MT_268 SeasonalNaive: 0.89
forms MT_319, one per cutoff: ETS(A,N,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_319 ZZA: 1.11
MASE MT_319 SeasonalNaive: 1.26
forms MT_370, one per cutoff: ETS(A,N,A) ETS(A,N,A) ETS(A,N,A)
MASE MT_370 ZZA: 1.05
MASE MT_370 SeasonalNaive: 1.25
On mean MASE, forcing the season brings AutoETS within a hair of seasonal naive, though not below it: 1.17 against 1.30 for the default and 1.16 for seasonal naive.
The forced season helps some clients and hurts others. It lowers the lead client's MASE, from 1.18 to 1.08, and MT_064's too, but it raises MT_370's, from 0.96 to 1.05. So forcing the season is a change to test on each client, not a fix to apply to all of them.
Working rule: Start with AutoETS for hourly demand with season_length=24, and print the chosen forms in every backtest. When a client takes a flat form, check that its seasonal form is not failing. If the seasonal fit has the lower likelihood, force the season with model="ZZA", and score both forms on earlier windows before you keep either: cutoffs before the held-out week that the report does not score, such as the four ordinary days in late November and early December 2014, which Chapter 5 sets aside for choices. The standard cutoffs show the comparison here, but they do not decide it. When a forecast gets worse, look first for a form that changed between cutoffs.
고정 계절 ARIMA 적합
두 번째 후보는 계절 naive 모형이 남기는 부분을 모형화한다. 3장의 백테스트는 이 모형이 무엇을 더하는지 확인하는 시험이다. ARIMA 모형은 차분을 거친 뒤 다음 관측값을 이전 관측값과 이전 오차의 가중합으로 나타낸다. 차분이란 한 관측값에서 한 계절 이전의 관측값을 빼는 것이다. 이 모형은 ARIMA(p,d,q)(P,D,Q)[m]으로 쓴다. 비계절 부분에는 p개의 자기회귀 항, d번의 차분, q개의 이동평균 항이 있다. 계절 부분에도 같은 세 요소가 있으며, 이들은 계절 길이 m의 배수인 시차에 놓인다.
이 책의 모형은 ARIMA(1,0,0)(1,1,0)[24]이다. 이 모형에는 자기회귀 항이 하나 있고, 일반 차분과 이동평균 항은 없으며, 시차 24의 계절 차분이 한 번, 시차 24의 계절 자기회귀 항이 하나 있다. B를 한 단계 되돌리는 연산자라 하고 B y_t를 y_(t-1)이라 하면, 이 모형은 다음과 같이 쓴다.
(1 - phi1 B)(1 - Phi1 B^24)(1 - B^24) y_t = e_t
(1 - B^24) 항은 각 관측값을 어제 같은 시각의 값으로부터의 변화량으로 바꾼다. 시간별 수요에서는 시차 24가 이 모형의 핵심이다. 각 시각을 어제 같은 시각과 비교하는 것은 계절 naive 모형이 하는 비교와 같고, 자기회귀 항은 그 비교가 남기는 부분을 모형화한다. 계절 차분이 수준을 제거하므로 이 모형에는 평균 항이 없다. statsforecast의 ARIMA는 차분한 시계열에서는 기본적으로 평균을 넣지 않는다(statsforecast/models.py, ARIMA docstring).
차수는 탐색으로 찾지 않고 고정한다. 그 이유는 자동 탐색에 관한 절에서 설명한다. 차수를 백테스트에 넣기 전에, 첫 번째 표준 컷오프 이전의 주요 고객 이력에 statsmodels 0.15.0으로 한 번 적합하고 적합된 모수의 이름을 출력한다. 그러면 모형에 직접 적어 둔 항이 들어 있는지 확인할 수 있다.
1"""Fit the fixed seasonal ARIMA with statsmodels on the lead client's history before the first standard cutoff, and print its parameter names. The parameter lines are what the prose reads."""2import pandas as pd3from statsmodels.tsa.statespace.sarimax import SARIMAX45from lib.backtest import history_before6from lib.electricity import load7from lib.settings import EVAL_CUTOFFS, LEAD, show89hist = history_before(load([LEAD]), pd.Timestamp(EVAL_CUTOFFS[0]))10y = pd.Series(hist["y"].to_numpy(), index=pd.DatetimeIndex(hist["ds"], freq="h"))11res = SARIMAX(y, order=(1, 0, 0), seasonal_order=(1, 1, 0, 24)).fit(disp=False)12show("hours of history", len(y))13for name in res.params.index:14 show("parameter", name)
python arima-summary-look.pyhours of history: 1344
parameter: ar.L1
parameter: ar.S.L24
parameter: sigma2
목록에는 ar.L1, ar.S.L24, sigma2의 세 이름이 있다. 첫째는 자기회귀 항으로, 어떤 시각의 어제 같은 시각 대비 변화가 다음 시각에 얼마나 이어지는지를 나타낸다. 둘째는 시차 24의 계절 항으로, 어떤 시각에서 하루 동안 생긴 변화가 다음 날 같은 시각에 얼마나 이어지는지를 나타낸다. 셋째는 오차의 분산이다. 목록에는 절편이 없다. statsmodels는 trend가 설정된 경우에만 계절 ARIMA에 절편을 더하므로, 시계열을 차분했는지와 관계없이 목록에는 절편이 나타나지 않으며, 계절 차분을 거친 모형에는 어차피 절편이 필요 없다. statsmodels의 전체 요약에는 각 값도 나온다. 이 책은 그 값을 인용하지 않는다. 값은 창과 라이브러리 버전에 따라 달라지므로, 독자에게는 숫자보다 각 항이 무엇을 뜻하는지가 더 필요하다.
이렇게 고정한 모형은 백테스트에서 AutoETS, 계절 naive 모형과 나란히 놓이는 또 하나의 후보가 된다. 이 모형의 점수는 아래의 비교 절에서 다룬다.
작업 규칙: 탐색이 너무 느려 컷오프마다 실행할 수 없으면 차수를 고정하고 호출에 적어 둔다. 요약은 한 번 출력하여, 나열된 항이 의도한 항인지 확인한다. 고정한 차수는 다른 모형과 마찬가지로 컷오프마다 다시 적합한다. 차수는 고정되어 있지만 계수는 그렇지 않다.
이 부분은 아직 번역되지 않았으므로 영어로 표시된다.
Compare models on the same cutoffs
Four forecasts now cover the same 24 hours at the same three cutoffs, from the same eight weeks of history, for the same eight clients: seasonal naive, AutoETS, AutoETS with the season forced, and ARIMA. Each backtest is a separate script, so each finishes well inside the 45 seconds the book allows an example on two CPUs.
One score is still missing: the fixed ARIMA's, on the same windows and measures.
1"""Backtest the fixed seasonal ARIMA(1,0,0)(1,1,0)[24] and seasonal naive for the eight clients of SUBSET8 over the three standard cutoffs.2The MASE gap and the count of clients where ARIMA wins, printed last, are the figures the comparison section quotes."""3import numpy as np4import pandas as pd5from statsforecast import StatsForecast6from statsforecast.models import ARIMA, SeasonalNaive78from lib.scoring import book_scale9from lib.electricity import load10from lib.quirks import filled_history, mask_clock_changes11from lib.settings import EVAL_CUTOFFS, HORIZON, SEED, SUBSET8, show12from lib.subsets import score_clients1314np.random.seed(SEED) # the seed from lib/settings.py, set before any fit15masked = mask_clock_changes(load(SUBSET8)) # clock-change hours become NaN, so they are never scored; filled_history fills them from their neighbours before each fit16scale = book_scale(load(SUBSET8), EVAL_CUTOFFS[0]) # MASE scale: rows before the first cutoff, from each client's first reading17# The order is fixed, not searched: one AR term, one seasonal difference and one seasonal AR term, all at lag 24.18# n_jobs=1 keeps the output the same from run to run.19sf = StatsForecast(models=[ARIMA(order=(1, 0, 0), season_length=24, seasonal_order=(1, 1, 0)),20 SeasonalNaive(season_length=24)], freq="h", n_jobs=1)21parts = []22for c in pd.to_datetime(EVAL_CUTOFFS):23 sf.fit(df=filled_history(masked, c)[["unique_id", "ds", "y"]]) # the eight weeks before c, clock hours filled from them24 part = sf.predict(h=HORIZON)25 # the first forecast hour must be the cutoff itself, or the window is misaligned26 if part["ds"].min() != c:27 raise ValueError(f"forecast for {c:%Y-%m-%d} does not start at the cutoff")28 parts.append(part)29forecasts = pd.concat(parts, ignore_index=True)3031summary, per_client = score_clients(forecasts, masked, ["ARIMA", "SeasonalNaive"], scale)32show("horizon hours", HORIZON)33show("windows", len(parts))34for label, value in summary.items():35 show(label, value)36show("MASE gap, SeasonalNaive minus ARIMA", summary["MASE SeasonalNaive"] - summary["MASE ARIMA"])37show("clients where ARIMA has lower MASE", int((per_client["ARIMA"] < per_client["SeasonalNaive"]).sum()))
python arima-subset-backtest.pyhorizon hours: 24
windows: 3
clients: 8
scored hours per client: 72
MAE ARIMA: 386.13
RMSE ARIMA: 576.30
MASE ARIMA: 1.09
MAE SeasonalNaive: 423.68
RMSE SeasonalNaive: 591.25
MASE SeasonalNaive: 1.16
MASE gap, SeasonalNaive minus ARIMA: 0.07
clients where ARIMA has lower MASE: 5
MAE is in kilowatt hours, and RMSE, the root mean squared error, punishes large misses more. Both are computed for each client over its 72 scored hours, then averaged over the eight clients, so each client counts once. MASE divides each client's MAE by the MAE that seasonal naive makes in its own history, over every reading before Dec 29, 2014, from each client's first reading and with the clock-change hours left out, then averages over clients. A MASE of 1 means the model is as accurate as seasonal naive was on its own past. The coverage of AutoETS is the share of scored hours that fall inside its 95% prediction interval, the range the model gives for each hour.
| Model | MAE (kWh) | RMSE (kWh) | MASE | Clients beating seasonal naive on MASE |
|---|---|---|---|---|
| SeasonalNaive | 423.68 | 591.25 | 1.16 | not applicable |
| AutoETS | 362.11 | 537.20 | 1.30 | 4 |
| AutoETS, season forced (ZZA) | 365.24 | 553.11 | 1.17 | 4 |
| ARIMA | 386.13 | 576.30 | 1.09 | 5 |
Read the last column as a count out of the eight clients, not as a score. The AutoETS intervals cover 0.910 of the scored hours, and the forced-season intervals cover 0.925. The nominal share is 0.95, so the intervals are a little narrow on this sample. Coverage checks the intervals, not the point forecast. An interval that covers too little is too narrow, and a planner who buys to it will be short more often than its label says. Chapter 8 returns to intervals and shows how to calibrate them on earlier windows.
The two measures disagree about AutoETS. Its mean MAE is the lowest of the four rows, and its mean MASE is the highest. MAE in kilowatt hours gives more weight to the clients with large loads, because their errors are large. MASE scales each client's error by that client's own history, so every client counts about the same. The per-client lines in the AutoETS run show where the MASE comes from. MT_064 has a MASE of 2.32, against 1.08 for seasonal naive, and it is one of the flat-form clients. MT_217 has 1.76, against 1.25, and its form changes from one cutoff to the next. The ranking depends on the measure, so the choice of measure is part of the decision.
Three windows are a small sample, as Chapter 3 explains. AutoETS beats seasonal naive on 4 of the eight clients, and ARIMA on 5. ARIMA is better than seasonal naive on both measures, and on MASE by 0.07. Three windows can't settle a gap that small.
Working rule: Score every candidate on the same cutoffs, with the same history and the same scale, and report MAE and MASE side by side. When the two disagree, say which one the decision needs. We recommend more windows before choosing between two models that differ by less than about a tenth of MASE. That threshold is a judgement from this sample, not a measurement.
늦게 시작하는 고객 살펴보기
부분집합에서 한 고객은 측정이 늦게 시작된다. MT_115의 0이 아닌 첫 측정값은 2014년 1월 14일 00:00에 나타난다. 그 이전에는 계량기가 0을 보고하며, 데이터는 해당 시간대에 before_first_reading 표시를 붙인다. 이 0은 낮은 사용량이 아니다. 모델이 이 값을 읽으면 그 고객에게 없는 사용 수준을 학습한다. 늦게 시작하는 고객이란 첫 측정값이 모델이 읽는 이력 안에 놓이는 고객이다. 해결책은 시작 규칙이다. 시계열은 첫 측정값에서 시작한다. 이는 공급자의 의사결정과 관련이 있다. 수준이 낮게 끌려 내려가면 그 고객을 위해 너무 적게 구매하게 되는데, 이는 공급자가 범하는 두 가지 오류 중 비용이 더 큰 쪽이다.
12월 기준 시점에서는 각 시점 이전 여덟 주가 모두 측정값으로 채워져 있으므로, 이 절에서는 2014년 2월 1일, 2014년 2월 15일, 2014년 2월 28일의 2월 기준 시점을 사용한다. 이 시점들의 여덟 주 이력은 여전히 첫 측정값 이전까지 거슬러 올라가므로, 해당 사례가 그 안에 들어 있다. 6장에서는 같은 규칙을 서른 명의 고객 모두에게 적용한다.
0으로 시작하는 이력
2월 각 기준 시점 이전 8주의 원시 이력을 0을 포함한 그대로 살펴보자. 이 이력에서 0인 시간의 비율은 2014-02-01에 68%, 2014-02-15에 43%, 2014-02-28에 20%이다. 기준 시점이 첫 측정값을 지날수록 이 비율은 낮아진다.
이력을 첫 측정값부터 시작하면 문제가 해결될 수 있다. 2월의 각 기준 시점에서 AutoETS를 두 번 적합한다. 한 번은 원시 8주 이력으로, 다른 한 번은 MT_115의 첫 측정값에서 시작하는 시작 이력으로 적합하며, 각 기준 시점부터 24시간에 대해 점수를 매기면 해결 여부를 알 수 있다.
1"""Backtest AutoETS for MT_115, a late starter, on three February cutoffs: once on its raw eight weeks and once on its history from its first reading.2The start-rule counts, printed first, and the three-window MAE lines are the figures the point rests on."""3import numpy as np4import pandas as pd5from statsforecast import StatsForecast6from statsforecast.models import AutoETS78from lib.backtest import history_before9from lib.electricity import load10from lib.quirks import fill_clock_change_hours, mask_clock_changes11from lib.settings import HORIZON, SEED, SUBSET8, show12from lib.starts import check_start_rule, history_from_start1314LATE = "MT_115" # the one late starter in SUBSET8, first non-zero reading on Jan 14, 201415# February cutoffs: at the December cutoffs every hour of the history is a reading, so the rule changes nothing there16CUTOFFS = pd.to_datetime(["2014-02-01", "2014-02-15", "2014-02-28"])1718np.random.seed(SEED) # the seed from lib/settings.py, set before any fit19dropped, flagged = check_start_rule(load(SUBSET8)) # raises unless the rule drops exactly the flagged rows, so the counts agree20show("start rule drops, SUBSET8", dropped)21show("flagged before_first_reading, SUBSET8", flagged)22masked = mask_clock_changes(load([LATE]))[["unique_id", "ds", "y", "quirk"]]232425def fit_and_score(hist, c):26 """Fit AutoETS on one history, forecast the 24 hours from c, and score it on those hours."""27 sf = StatsForecast(models=[AutoETS(season_length=24)], freq="h", n_jobs=1)28 sf.fit(df=fill_clock_change_hours(hist)[["unique_id", "ds", "y"]]) # clock-change hours filled from their neighbouring hours, as elsewhere29 fc = sf.predict(h=HORIZON)30 actual = masked[(masked["ds"] >= c) & (masked["ds"] < c + pd.Timedelta(hours=HORIZON))] # the day's 24 readings, to score against31 joined = fc.merge(actual[["ds", "y"]], on="ds", how="left")32 # the form's method name, the mean forecast, the day's MAE, and the mean of the readings33 return sf.fitted_[0, 0].model_["method"], float(joined["AutoETS"].mean()), float((joined["y"] - joined["AutoETS"]).abs().mean()), float(joined["y"].mean())343536maes = {"raw": [], "start": []}37for c in CUTOFFS:38 raw_hist = history_before(masked, c) # the eight weeks before c, zeros included; it insists on exactly 1,344 rows39 # the share of hours that read zero, including the leading zeros before the first reading40 show(f"zero percent before {c:%Y-%m-%d}", round(100 * (raw_hist["y"] == 0).mean()))41 # the start history begins at the first reading, so it is shorter wherever the client starts late42 for label, hist in [("raw", raw_hist), ("start", history_from_start(masked, c))]:43 form, fc_mean, window_mae, actual_mean = fit_and_score(hist, c)44 show(f"{label} history hours {c:%Y-%m-%d}", len(hist))45 show(f"{label} form {c:%Y-%m-%d}", form)46 show(f"{label} mean forecast {c:%Y-%m-%d}", fc_mean)47 show(f"{label} mean actual {c:%Y-%m-%d}", actual_mean)48 show(f"MAE {label} {c:%Y-%m-%d}", window_mae)49 maes[label].append(window_mae)50for label in maes:51 show(f"MAE {label}, three windows", np.mean(maes[label]))52 show(f"MAE {label}, 2014-02-15 and 2014-02-28", np.mean(maes[label][1:])) # [1:] skips Feb 1, the first cutoff
python late-starter-trim.pystart rule drops, SUBSET8: 9072
flagged before_first_reading, SUBSET8: 9072
zero percent before 2014-02-01: 68
raw history hours 2014-02-01: 1344
raw form 2014-02-01: ETS(A,N,N)
raw mean forecast 2014-02-01: 16.43
raw mean actual 2014-02-01: 24.06
MAE raw 2014-02-01: 8.81
start history hours 2014-02-01: 432
start form 2014-02-01: ETS(M,Ad,A)
start mean forecast 2014-02-01: 23.88
start mean actual 2014-02-01: 24.06
MAE start 2014-02-01: 3.72
zero percent before 2014-02-15: 43
raw history hours 2014-02-15: 1344
raw form 2014-02-15: ETS(A,N,A)
raw mean forecast 2014-02-15: 24.54
raw mean actual 2014-02-15: 27.11
MAE raw 2014-02-15: 4.29
start history hours 2014-02-15: 768
start form 2014-02-15: ETS(M,Ad,A)
start mean forecast 2014-02-15: 23.84
start mean actual 2014-02-15: 27.11
MAE start 2014-02-15: 4.77
zero percent before 2014-02-28: 20
raw history hours 2014-02-28: 1344
raw form 2014-02-28: ETS(A,N,A)
raw mean forecast 2014-02-28: 23.73
raw mean actual 2014-02-28: 23.54
MAE raw 2014-02-28: 2.93
start history hours 2014-02-28: 1080
start form 2014-02-28: ETS(M,Ad,A)
start mean forecast 2014-02-28: 22.48
start mean actual 2014-02-28: 23.54
MAE start 2014-02-28: 2.73
MAE raw, three windows: 5.34
MAE raw, 2014-02-15 and 2014-02-28: 3.61
MAE start, three windows: 3.74
MAE start, 2014-02-15 and 2014-02-28: 3.75
피해는 수준(level)에 나타나며, 2월 1일에 가장 크다. AutoETS는 원시 이력을 오류 없이 적합하고 경고 없이 예측한다. 2014-02-01에는 평탄한 형태인 ETS(A,N,N)을 선택하며, 그 예측은 하루 동안 시간당 평균 16.43 kWh이다. 이후의 측정값은 평균 24.06 kWh이다. 이날의 MAE는 8.81 kWh이다. 원인은 0으로 보인다. 0이 수준을 끌어내리는데, 모형은 이 값이 사용량이 아니라는 점을 알지 못한다.
나머지 두 날에는 원시 이력의 오차가 훨씬 작아서, 2014-02-15에는 4.29 kWh, 2014-02-28에는 2.93 kWh이다. 따라서 피해는 구간에 0이 얼마나 들어 있는지에 따라 달라진다. 앞쪽의 0은 사용량이 아니므로, 0의 비율과 관계없이 이 규칙은 옳다.
각 시계열을 첫 측정값에서 시작하기
시작 규칙은 시계열이 첫 측정값에서 시작한다고 정한다. 이 규칙은 고객의 값이 영이 아닌 첫 측정값보다 앞선 모든 측정값을 버리고, 그 뒤의 모든 측정값은 영 값을 포함해 유지한다. 시작 이후의 영 값은 실제 낮은 사용량이며 모델에 필요하기 때문이다. 첫 측정값 이후에 시작하는 창은 모든 시간을 그대로 유지한다. 이 규칙은 앞쪽에 놓인 영 값만 제거하기 때문이다. 이 규칙은 examples/lib/starts.py에 있으므로 이후 장에서도 같은 코드를 호출한다. 이 파일의 함수 history_from_start(df, cutoff)는 규칙을 적용한 한 기준 시점의 이력을 반환한다. 이 이력은 기준 시점 앞 여덟 주의 측정값이며, 첫 측정값부터 시작한다. 함수는 기준 시점 이전의 행만으로 첫 측정값을 찾으므로, 기준 시점 이후의 측정값은 모델에 전달되지 않는다. 고객에게 기준 시점 이전의 측정값이 없거나 이력이 48시간보다 짧으면 오류를 발생시킨다.
규칙을 사용하기 전에, 규칙이 플래그가 가리키는 대로 동작하는지 확인한다. check_start_rule는 규칙이 전체 시계열에서 버릴 행을 세고, 그 행이 before_first_reading 플래그가 붙은 행과 정확히 같지 않으면 오류를 발생시킨다. 부분 집합에서 규칙은 9072시간을 버리고, 플래그는 9072을 표시한다. 둘은 일치한다. 부분 집합의 유일한 늦은 시작 고객은 MT_115이다.
규칙은 첫 기준 시점에서 이력을 가장 많이 줄여 1,344시간 대신 432시간이 되고, 기준 시점이 첫 측정값에서 멀어질수록 덜 줄인다. 2월 15일에는 768시간, 2월 28일에는 1080시간이다.
시작 이력은 세 기준 시점 모두에서 ETS(M,Ad,A)을 고른다. 이 형태는 곱셈 오차, 감쇠 추세, 가산 계절성을 갖는다. 원래 이력은 날마다 형태가 바뀌어, 2월 1일의 평탄한 형태에서 2014년 2월 15일에는 ETS(A,N,A), 2014년 2월 28일에는 ETS(A,N,A)이 된다.
세 창의 MAE는 5.34 kWh에서 3.74 kWh로 떨어진다. 이득은 창마다 고르지 않으며, 이득 전부가 2월 1일에서 나온다. 이날 MAE는 8.81에서 3.72 kWh로 떨어진다.
2월 15일에는 규칙의 결과가 더 나쁘고, 2월 28일에는 조금 더 낫다. 두 날을 합치면 원래 이력이 약간 더 낫다. 평균 MAE는 원래 이력이 3.61 kWh이고 시작 이력이 3.75이다.
적합 결과는 2월 15일에 규칙이 어떻게 손해를 보는지 보여 준다. 시작 이력은 여전히 768시간으로 짧고, 감쇠 추세는 원래 적합보다 낮게 예측한다. 시간당 평균 예측은 23.84 kWh이고, 원래 적합은 24.54이며, 실제 측정값의 평균은 27.11 kWh였다. 이 낮은 예측이 이 사례가 경고하는 비용이다. 고객 한 명과 사흘은 작은 표본이므로, 이 수치는 규칙을 증명하지 않고 예시로 보여 줄 뿐이다.
작업 규칙: 고객의 이력에 영 값이 있으면, 값이 영이 아닌 첫 측정값이 이력 안에 놓이는지 확인한다. 놓인다면 영 값의 비중과 관계없이 모델이 이력을 보기 전에 시작 규칙을 적용한다. 앞쪽의 영 값은 사용량이 아니기 때문이다. 먼저 전체 시계열에 check_start_rule를 실행하고, 실패하면 무엇이든 자르기 전에 원인을 찾는다. 기준 시점마다 이력 길이를 출력한다. 이력이 짧아지는 것은 규칙이 너무 많이 가져갔다는 첫 신호이기 때문이다.
시즌 24에서 이 책이 자동 ARIMA를 피하는 이유
AutoARIMA는 차수를 고정하지 않고 탐색한다. 후보 차수에 대해 단계적 탐색을 수행하고, 기본값인 AICc로 가장 좋은 모델을 고르며, 후보 모델을 최대 94개까지 적합한 뒤 멈춘다(statsforecast 2.1.1, statsforecast/models.py, 그리고 statsforecast/arima.py에 있는 중단 메시지). 각 후보는 완전한 상태 공간 적합이다. 시즌이 24이면 시차 24에 계절 항이 있는 후보마다 적합이 느리고, 탐색은 그런 후보를 수십 개 시도하므로 이 장의 적합보다 훨씬 오래 걸린다.
이 책이 고정한 환경, 즉 CPU 두 개와 statsforecast 2.1.1에서 클라이언트 하나의 윈도 하나를 적합하는 데 약 75초가 걸렸다. 이는 첫 번째 표준 컷오프에서 MT_014에 대해 한 번 실행한 결과였다. 부분집합에는 이런 윈도가 24개 필요하므로 백테스트 한 번에 약 30분이 걸린다. 이 책이 예제 하나에 허용하는 시간은 45초이다. 이는 이 책이 직접 측정한 값이지 책에 실린 예제가 아니며 환경에 따라 달라지므로, 일정을 짜기 전에 직접 사용하는 기계에서 시간을 재어 보아야 한다. 고정 차수는 윈도마다 적합을 한 번만 수행하며, 여기서 중요한 차이가 바로 이것이다. 고정 차수의 약점은 패턴이 차수의 가정과 다른 클라이언트이다. 백테스트가 이를 확인하는 수단이며, 비교 절의 점수를 보면 된다.
고정 차수는 발견이 아니라 판단이다. 데이터에 일 단위 패턴이 있고 이 장의 백테스트에는 끝까지 실행되는 모델이 필요하므로, 시즌 24에 (1,0,0)(1,1,0)을 선택했다. 차수는 독자가 보고 바꿀 수 있도록 호출 안에 있다. 이후의 장들은 같은 윈도에서 이 모델과 비교하므로, 차수를 바꾸면 점수에 그 변화가 나타난다.
작업 규칙: 매일 다시 적합하는 일정에서 시간 단위 데이터에 시즌 24로 자동 탐색을 실행하지 않는다. 적용을 확정하기 전에 클라이언트 하나에서 탐색 시간을 재어 본다. 너무 느리면 차수를 고정하고 그 차수를 백테스트에서 검증한다.
운영 환경에서 잘못되는 것
- 누락된 계절. 계절 길이를 1로 두면 일 단위 패턴이 없는 모델이 만들어지며, 오류는 나타나지 않는다. 징후는 모든 고객이 ETS(A,N,N)처럼 계절이 없는 형태를 선택하는 것이다. 몇몇 고객만 그렇다면 다른 경우로, 계절 적합이 실패한 것이며 지수평활 절의 평탄 형태 점검으로 확인한다. 재적합할 때마다 선택된 형태를 기록한다.
- 뒤늦게 시작한 고객의 0. 이력 안에서 측정을 시작한 고객은 첫 측정값이 윈도 밖으로 벗어날 때까지 수준이 낮게 끌려 내려간다. 징후는 시작 이후 며칠 동안 예측이 낮게 나오는 것이다. 재적합 전에 각 고객 이력에서 0이 차지하는 비율을 세고, 첫 측정값이 이력 안에 있는 고객에게는 시작 규칙을 적용한다.
- 바뀌는 형태. 한 고객에 대해 선택된 형태가 재적합 사이에 바뀔 수 있다. 그 자체가 잘못은 아니지만, 계절 형태에서 계절이 없는 형태로 바뀐 경우에는 측정값과 대조해 볼 만하다. 형태는 실행 로그에 남겨 둔다.
- 쌓이는 비용. 적합 횟수는 고객 수, 윈도 수, 재적합 횟수를 곱한 만큼 늘어난다. 일정에 고객을 추가하기 전에 이를 먼저 세어 본다.
- 빗나가는 구간. 이 표본에서 AutoETS 구간이 포함한 시간의 비율은 0.910로, 명목 수준인 0.95에 못 미쳤다. 8장에서는 이전 윈도를 이용해 구간을 보정하는 방법을 보인다. 그렇게 보정하기 전까지는 구간을 95% 범위로 제시하지 않는다.
- 알아차리는 방법. 매일의 윈도마다 모든 통계 모델 옆에 계절 나이브를 실행하고 MASE 차이를 기록한다. 차이의 부호가 날마다 바뀌면 보고할 결과가 아니라 모델을 살펴보아야 한다는 신호이다.
이 장에서 내린 결정
- 계절 주기 24의 AutoETS. 기본값인
model="ZZZ"와 계절 주기를 강제한 실행인model="ZZA"를 모두 보고한다. 평탄한 선택은 계절 적합이 실패한 결과일 수 있기 때문이다. 이 장은 두 형태 가운데 하나를 선택하지 않는다. 표준 컷오프 비교는 보고할 뿐 선택에 쓰지 않으며, 선택은 더 이른 구간에서 이루어져야 한다. 1장은 주 고객에게ZZA를 강제했고, 이 장은 여덟 고객 모두에 대해 강제 실행 결과를 보인다. - 탐색 없이 고정한 ARIMA(1,0,0)(1,1,0)[24]. 이는 명시한 판단이며, 이 판단을 검증하는 것이 백테스트다.
- 서른 명이 아니라 여덟 명의 고객. 6장은 서른 명의 고객 전체를 하나의 모델로 적합한다. 고정된 환경에서 서른 명 전체에 대해 고객별 AutoETS를 세 구간에 걸쳐 적합하면 약 97초가 걸린다. 이 책이 예제 하나에 허용하는 시간은 45초이므로, 이 장은 부분 집합을 사용한다.
- 부분 집합, 컷오프, 척도.
SUBSET8, 표준 컷오프 세 개, 2014년 12월 29일부터 12월 31일까지, 1,344시간의 이력, 그리고 모든 비교에서 기준선으로 쓰는 계절 naive 예측이다. MASE 척도는 시계 변경 시간을 제외하고 각 고객의 첫 측정값부터 읽는다. - 시계 변경 시간. 부분 집합의 모든 예제는 이 시간을 마스킹하고 이력으로 채운다. 이는 3장에서 설명한 방식이다. 세 구간 어디에도 시계 변경 시간은 없으므로, 마스킹은 어떤 예측도, 채점되는 어떤 시간도 바꾸지 않는다. 그러나 MASE 척도는 2014년 12월 29일 이전의 모든 이력을 읽으므로 척도는 바뀌며, 이 척도는 2014년 1월 14일부터
MT_115을 센다. - 늦게 시작하는 고객: 2월 컷오프와 시작 규칙. 12월 컷오프는
MT_115의 늦은 시작을 다루지 못하므로 2월 컷오프가 이를 다룬다. 6장은 이 규칙을 서른 명의 고객 전체에 적용한다. - 두 AutoETS 실행에만 적용하는 커버리지. ARIMA 백테스트는 여기서 구간 없이 채점한다.
- 적합된 값은 인용하지 않는다. ARIMA 스크립트는 매개변수 이름만 출력하고, 평탄한 형태 점검은 개수만 출력한다. 오차는 소수 둘째 자리까지, 커버리지는 소수 셋째 자리까지 반올림한다.
- 5장을 위한 통계적 기준선. 이 구간들에서 고객별 AutoETS와 ARIMA가 얻은 점수는 그래디언트 부스팅 모델이 넘어서야 하는 기준이다.
- 이어서 가져갈 것. 평탄한 형태는 실패한 계절 적합일 수 있으므로, 모든 점수와 함께 선택된 형태를 읽어야 한다. MAE와 MASE는 모델의 순위를 다르게 매길 수 있으므로, 결정에 필요한 것이 어느 쪽인지 밝혀야 한다. 각 시계열은 첫 측정값에서 시작하고, 비슷한 모델 사이에서 선택하기 전에 구간을 더 추가해야 한다.
이 판의 이 장
2026.11.11판예제 통과 2026년 11월 20이 장에서 6개 예제개 중 6개가 통과한다
영어판 2026.11.11판을 번역한 것이다.