# ---
# 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 matplotlib.pyplot as plt
import seaborn as sns
import numpy
import torch
import pandas as pd

# +
from CVAE_testbed.utils.compare_plots import compare_plots_best_performing, plot_single_model_multiple_epoch, plot_multiple_model_multiple_epoch

#"/home/ritvik.vasan/Github/cookiecutter/CVAE_testbed/scripts/outputs/aics_features/159_features/new2/2019:09:06:12:47:55/"
paths_to_compare = ["/home/ritvik.vasan/Github/cookiecutter/CVAE_testbed/scripts/outputs/aics_159_features_beta_1/",
                    "/home/ritvik.vasan/Github/cookiecutter/CVAE_testbed/scripts/outputs/aics_159_features_beta_0.5_fix_test_size/",
                    "/home/ritvik.vasan/Github/cookiecutter/CVAE_testbed/scripts/outputs/aics_159_features_beta_0.1/",
                   ]




# -

# # Compare models during train + test

# +
csv = {'save_dir': [], 'csv_path': []}

for j in range(len(paths_to_compare)):
    csv['save_dir'].append(paths_to_compare[j])
    csv['csv_path'].append(csv['save_dir'][j] + "costs.csv")

# Plot KLD vs MSE for multiple models and numbers of conditions
compare_plots_best_performing(csv)

# Plot KLD vs MSE for multiple models, numbers of conditions and epochs
plot_multiple_model_multiple_epoch(csv)

# CHOOSE SINGLE CSV
single_csv = {'save_dir': csv['save_dir'][0], 'csv_path': csv['csv_path'][0]}

# Plot KLD vs MSE for multiple number of conditions and epochs for a single model
# plot_single_model_multiple_epoch(single_csv)
# -

# # Compare model during encoding test

from CVAE_testbed.utils.compare_plots import compare_plots_best_performing_encoding

# +
csv = {'save_dir': [], 'csv_path': []}
for j in range(len(paths_to_compare)):
    csv['save_dir'].append(paths_to_compare[j])
    csv['csv_path'].append(csv['save_dir'][j] + "encoding_kl_vs_rcl.csv")


compare_plots_best_performing_encoding(csv)
# -

# # Compare models for ELBO/FID vs beta

from CVAE_testbed.utils.compare_plots import compare_plots_beta

# +
csv = {'save_dir': [], 'csv_path_1': [], 'csv_path_2': []}
for j in range(len(paths_to_compare)):
    csv['save_dir'].append(paths_to_compare[j])
    csv['csv_path_1'].append(csv['save_dir'][j] + "encoding_kl_vs_rcl.csv")
    csv['csv_path_2'].append(csv['save_dir'][j] + "fid_data.csv")
    

compare_plots_beta(csv)
# -



StarcoderdataJupyterScriptsDedupFiltered