Visualization Documentation

Dataset exploration

supernnova.visualization.visualize.plot_lightcurves(df, SNIDs, settings)[source]

Utility for gridspec of lightcruves

Parameters:
  • df (pandas.DataFrame) – dataframe holding the data

  • SNIDs (np.array or list) – holds lightcurve ids

  • settings (ExperimentSettings) – controls experiment hyperparameters

supernnova.visualization.visualize.plot_random_preprocessed_lightcurves(settings, SNIDs)[source]

Plot lightcurves specified by SNID_idxs from the preprocessed, pickled database

Parameters:
  • settings (ExperimentSettings) – controls experiment hyperparameters

  • SNIDs (list) – list of SN lightcurve IDs to plot

supernnova.visualization.visualize.plot_lightcurves_from_hdf5(settings, SNID_idxs)[source]

Plot lightcurves specified by SNID_idxs from the HDF5 database

Parameters:
  • settings (ExperimentSettings) – controls experiment hyperparameters

  • SNID_idxs (list) – list of SN lightcurve index to plot

supernnova.visualization.visualize.visualize(settings)[source]

Plot a random subset of lightcurves

2 plots: one with preprocessed data and one with processed data The two plots should show the same data

Parameters:

settings (ExperimentSettings) – controls experiment hyperparameters

Plotting predictions

supernnova.visualization.early_prediction.make_early_prediction(settings, nb_lcs=1, do_gifs=False)[source]

Load model corresponding to settings or (if specified) load a list of models.

  • Show evolution of classification for one time-step, then 2, up to all of the lightcurve

  • For Bayesian models, show uncertainty in the prediction

  • Figures are save in the figures repository

Parameters:
  • settings – (ExperimentSettings) custom class to hold hyperparameters

  • int (nb_lcs) – number of light-curves to plot, default is 1

supernnova.visualization.early_prediction.plot_gif(settings, df_plot, SNID, redshift, peak_MJD, target, arr_time, d_pred)[source]

Create GIFs for classification

supernnova.visualization.prediction_distribution.plot_prediction_distribution(settings)[source]

Load model corresponding to settings or (if specified) load a list of models.

Parameters:
  • settings – (ExperimentSettings) custom class to hold hyperparameters

  • int (nb_lcs) – number of light-curves to plot, default is 1