# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np
y_cpi = np.load("cycle1/y_cpi.npy")
y_cum = np.load("cycle1/y_cumilative.npy")

import matplotlib.pyplot as plt
plt.figure(figsize=(10,10))
plt.plot([i for i in range(48)],y_cpi/max(y_cpi),color = 'g',label = "CPI")
plt.plot([i for i in range(48)],y_cum/max(y_cum),color = 'r',label = "CUM")
plt.legend()

M = []
for i in range(1,len(y_cum)+1) :
    M.append(sum(y_cum[:i])/i)

len(M)

y_cum[:1]

M[2]

import matplotlib.pyplot as plt
plt.figure(figsize=(10,10))
plt.plot([i for i in range(48)],y_cpi/max(y_cpi),color = 'g',label = "CPI")
plt.plot([i for i in range(48)],y_cum/max(y_cum),color = 'r',label = "CUM")
plt.plot([i for i in range(48)],M/max(M),color = 'b',label = "moving_avg")
plt.legend()
plt.savefig("cycle1/CPI_vs_avg.png",dpi=100)

plt.savefig("cycle1/CPI_vs_avg.png",dpi=100)

plt.plot(M)

plt.plot(y_cum)



StarcoderdataJupyterScriptsDedupFiltered