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

# + id="pAM7jZb3iyUu" executionInfo={"status": "ok", "timestamp": 1614335466757, "user_tz": -60, "elapsed": 556, "user": {"displayName": "<NAME>", "photoUrl": "https://lh3.googleusercontent.com/a-/AOh14GgdXvq_fTRzxq1W4xPc6kpcov6LGHBk-CJycAyf=s64", "userId": "04563411618181728218"}}
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('seaborn')

# + id="9TPgGTNBi20i" executionInfo={"status": "ok", "timestamp": 1614335675741, "user_tz": -60, "elapsed": 442, "user": {"displayName": "<NAME>", "photoUrl": "https://lh3.googleusercontent.com/a-/AOh14GgdXvq_fTRzxq1W4xPc6kpcov6LGHBk-CJycAyf=s64", "userId": "04563411618181728218"}}
X = np.load('X.npy')
y = np.load('y.npy')


# + id="V01BTOf-6-pe" executionInfo={"status": "ok", "timestamp": 1614335676709, "user_tz": -60, "elapsed": 348, "user": {"displayName": "<NAME>", "photoUrl": "https://lh3.googleusercontent.com/a-/AOh14GgdXvq_fTRzxq1W4xPc6kpcov6LGHBk-CJycAyf=s64", "userId": "04563411618181728218"}}
def filter(array, inf=-1, sup=2.5):
  array = array[array > inf]
  array = array[array < sup]
  return array


# + id="0oi2VX6Wz2pw" executionInfo={"status": "ok", "timestamp": 1614335676935, "user_tz": -60, "elapsed": 334, "user": {"displayName": "<NAME>", "photoUrl": "https://lh3.googleusercontent.com/a-/AOh14GgdXvq_fTRzxq1W4xPc6kpcov6LGHBk-CJycAyf=s64", "userId": "04563411618181728218"}}
reactivity = y[:, :, 0].mean(axis=1)
deg_Mg_pH10 = y[:, :, 1].mean(axis=1)
deg_pH10 = y[:, :, 2].mean(axis=1)
deg_Mg_50C = y[:, :, 3].mean(axis=1)
deg_50C = y[:, :, 4].mean(axis=1)

# + colab={"base_uri": "https://localhost:8080/", "height": 586} id="0AaFHQqK2Xyc" executionInfo={"status": "ok", "timestamp": 1614335678831, "user_tz": -60, "elapsed": 2019, "user": {"displayName": "<NAME>", "photoUrl": "https://lh3.googleusercontent.com/a-/AOh14GgdXvq_fTRzxq1W4xPc6kpcov6LGHBk-CJycAyf=s64", "userId": "04563411618181728218"}} outputId="ea8446c6-2aa4-4839-9023-aeff31433b74"
targets = [reactivity, deg_Mg_pH10, deg_pH10, deg_Mg_50C, deg_50C]
colors = ['pink', 'purple', 'cyan', 'red', 'orange']
names = ['reactivity', 'deg_Mg_pH10', 'deg_pH10', 'deg_Mg_50C', 'deg_50C']

def plot_targets(targets, colors, names):
  plt.figure(figsize=(35, 11))
  for i in range(5):
    plt.subplot(2, 3, i+1)
    plt.hist(targets[i], bins=50, density=True, edgecolor='white', 
             color=colors[i], label=names[i])
    plt.legend(loc='upper right')
  plt.show()

plot_targets(targets, colors, names)

StarcoderdataJupyterScriptsDedupFiltered