Course Notes: Machine Learning for Time Series Data in Python
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    Visualize the Scores

    # Write and run code here
    import pandas as pd
    import matplotlib.pyplot as plt
    
    # Define the all_scores variable
    all_scores = pd.Series([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
    
    # Visualize the scores
    ax = all_scores.rolling(10).mean().plot(cmap=plt.cm.coolwarm)
    ax.set(title='Scores for multiple windows', ylabel='Correlation (r)')
    plt.show()