<jupyter_start><jupyter_text>Zcstarr Challenge2<jupyter_code>%load_ext autotime
%load_ext autoreload
%autoreload 2
%matplotlib inline
import matplotlib.pyplot as plt
import sys
sys.path.append('./')
from cadCAD_tools import easy_run
from rai_digital_twin import default_model
import pandas as pd
backtest_df = pd.read_csv('./data/runs/2021-11-11 06:35:34.433304-backtesting.csv.gz',compression='gzip')
extrapolation_df = pd.read_csv('./data/runs/2021-11-11 06:58:57.828631-extrapolation.csv.gz',compression='gzip')
extrapolation_df.redemption_price.mean()
extrapolation_df
def plot(x, y, ax, title, y_label):
    ax.set_title(title)
    ax.set_ylabel(y_label)
    ax.plot(x, y)
    ax.margins(x=0, y=0)
fig, (ax1, ax2) = plt.subplots(ncols=2)
fig.set_size_inches(14, 4)
fig.tight_layout()
plot(backtest_df.seconds_passed.index, backtest_df.eth_price, ax1, 'eth prices vs steps passed', 'eth_price')
plot(backtest_df.seconds_passed.index, backtest_df.market_price, ax2, 'market prices vs steps passed', 'market_price')
fig, (ax1, ax2) = plt.subplots(ncols=2)
fig.set_size_inches(14, 4)
fig.tight_layout()
plot(extrapolation_df.index, extrapolation_df.redemption_price, ax1, 'redemption price vs steps passed', 'redemption_price')
plot(extrapolation_df.index, extrapolation_df.redemption_rate, ax2, 'redemption rate vs steps passed', 'redemption_rate')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12753623188405797, 'fraction_numerical': 0.043478260869565216, 'mean_word_length': 7.269461077844311, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '371822', 'license': 'Apache-2.0', 'n_tokens_mistral': 577, 'n_tokens_neox': 533, 'n_words': 98, 'path': 'Understanding_RAI_DT_Challenges/zcstarr/challenge_2.ipynb', 'repo_name': 'zcstarr/RAI-Digital-Twin-Workshops', 'size': '1380'}