In [11]:
from __future__ import division
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn.apionly as sns
from sklearn.metrics import accuracy_score
from sklearn.model_selection import cross_val_score
from composition.analysis.load_sim import load_sim
import composition.analysis.plotting_functions as plotting
import composition.analysis.data_functions as data_functions
%matplotlib inline
In [12]:
sns.set_palette('muted')
sns.set_color_codes()
In [13]:
df, cut_dict = load_sim(return_cut_dict=True)
selection_mask = np.array([True] * len(df))
# standard_cut_keys = ['ShowerLLH_reco_exists', 'reco_zenith', 'IT_signal']
standard_cut_keys = ['reco_exists']
# standard_cut_keys = ['reco_exists', 'reco_zenith', 'num_hits', 'IT_signal',
# 'StationDensity', 'max_charge_frac', 'reco_containment',
# 'energy_range']
for key in standard_cut_keys:
selection_mask *= cut_dict[key]
print('n_events before cuts = {}'.format(len(df)))
df = df[selection_mask]
print('n_events after cuts = {}'.format(len(df)))
In [14]:
df.MC_log_energy.plot(kind='hist', bins=np.arange(5.0, 9.51, 0.05), alpha=0.5, label='MC')
df.reco_log_energy.plot(kind='hist', bins=np.arange(5.0, 9.51, 0.05), alpha=0.5, label='ShowerLLH', logy=True)
plt.xlabel('$\log_{10}(\mathrm{E}/\mathrm{GeV})$')
plt.legend()
Out[14]:
In [15]:
df.plot(kind='hexbin', x='MC_x', y='MC_y')
Out[15]:
In [16]:
df.plot(kind='hexbin', x='reco_x', y='reco_y')
Out[16]:
In [17]:
from pandas.tools.plotting import parallel_coordinates
In [18]:
parallel_coordinates?
In [ ]:
parallel_coordinates()