Skip to content

Why was offset used to plot time series in Notebook 10? #143

Answered by mrdbourke
abhi8893 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey abhi,

Check the parameters of the plot_time_series() function.

The start parameter is used to start the plot at a certain index (an offset).

# Account for the test_window offset and index into test_labels to ensure correct plotting
plot_time_series(timesteps=X_test[-len(test_windows):], 
    values=test_labels[:, 0], 
    start=offset, # 'offset' variable used here to make the plot start later in the series
    label="Test_data")

Try adjusting the offset parameter and seeing how it changes the plot.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@abhi8893
Comment options

@mrdbourke
Comment options

Answer selected by mrdbourke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants