Purpose of training dataset in testing? #79
ozanbarism
started this conversation in
General
Replies: 1 comment
-
|
test_data.input contains the context windows, whereas test_data.labels contain the forecast horizon, no need to make any changes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i was checking your starter code shown below.
Split into train/test set
train, test_template = split(
ds, offset=-TEST
) # assign last TEST time steps as test set
Construct rolling window evaluation
test_data = test_template.generate_instances(
prediction_length=PDT, # number of time steps for each prediction
windows=TEST // PDT, # number of windows in rolling window evaluation
distance=PDT, # number of time steps between each window - distance=PDT for non-overlapping windows
)
Prepare pre-trained model by downloading model weights from huggingface hub
model = MoiraiForecast(
module=MoiraiModule.from_pretrained(f"Salesforce/moirai-1.0-R-{SIZE}"),
prediction_length=PDT,
context_length=CTX,
patch_size=PSZ,
num_samples=100,
target_dim=1,
feat_dynamic_real_dim=ds.num_feat_dynamic_real,
past_feat_dynamic_real_dim=ds.num_past_feat_dynamic_real,
)
predictor = model.create_predictor(batch_size=BSZ)
forecasts = predictor.predict(test_data.input)
here the train is never used again. Additionally, the predictor takes test_data as input. however, i believe it should take some context window from training data as input and then make predictions that will be compared to the test data. how can i achieve that? what do i need to change?
Beta Was this translation helpful? Give feedback.
All reactions