check_mixed_cadence_X_forecast_resolves¶
yohou.testing.check_mixed_cadence_X_forecast_resolves(forecaster, y_train, X_actual_train, X_forecast, forecasting_horizon=3)
¶
Check that a channel on a slower schedule survives step-column derivation.
A single X_forecast frame may carry channels issued on different
schedules. Each base column resolves against its own newest applicable
vintage, densified before derivation, so a slower channel is not collapsed
to null by the frame-wide as-of. This check drives every X_forecast
consuming forecaster with a mixed-cadence frame and confirms the slower
channel reaches the dense cache rather than being dropped.
The frame is made mixed by issuing the last base column at only its earliest
vintage while the rest stay at every vintage. That leaves the slow channel
null for later observations, so the check runs on a clone using a
null-tolerant estimator (DummyRegressor with nan_handling="pass"
where those params exist): the resolution path is what is under test, not the
estimator's response to nulls, which the fully-covered checks already carry.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
forecaster
|
BaseForecaster
|
Unfitted forecaster instance that consumes |
required |
y_train
|
DataFrame
|
Training target data. |
required |
X_actual_train
|
DataFrame or None
|
Training features. |
required |
X_forecast
|
DataFrame
|
External forecasts in tidy format, used as the uniform baseline from which a mixed-cadence variant is derived. |
required |
forecasting_horizon
|
int
|
Number of steps ahead to forecast. |
3
|
Source Code ¶
Source code in src/yohou/testing/forecaster.py
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 | |