Kaggle competition: NFL Big Data Bowl
<SOS> metric: CRPS Kaggle data source: nfl-big-data-bowl<categorify>
df = pd.read_csv('/kaggle/input/nfl-big-data-bowl-2020/train.csv', low_memory=False)
 feats_player = ['Team', 'X', 'Y', 'S', 'A', 'Dis', 'Orientation', 'Dir',
'NflId', 'DisplayName', 'JerseyNumber', 'PlayerHeight', 'PlayerWeight',
'PlayerBirthDate', 'PlayerCollegeName', 'Position']
for id_ in ['PlayId', 'GameId']:
df_ = df.drop(columns=feats_player)
 groups = df_.groupby(id_)
 s = groups.agg(lambda s: len(s.unique())).apply(max)
 print('---------- ' + id_ + ' 内共通 ----------')
 for index, value in s.iteritems() :
if value == 1:
print(index )
<define_variables><EOS> 
prediction_df = pd.DataFrame()
for y in range(-99, 100):
prediction_df['Yards' + str(y)] = [0.0]
loss = []
for i in range(len(df_play_2018)) :
target_df_ = df_play_2018.iloc[[i],:]
prediction_df_ = prediction_df.copy()
make_my_predictions_0(target_df_, prediction_df_)
 actual_ = np.array([0.0] * 199)
 actual_[yard_to_index[target_df_['Yards'].iloc[0]]:] = 1.0
loss_ =(prediction_df_.iloc[0,:] - actual_)*(prediction_df_.iloc[0,:] - actual_)
 loss.append(loss_.mean())
 print(np.array(loss ).mean())
 loss = []
for i in range(len(df_play_2018)) :
target_df_ = df_play_2018.iloc[[i],:]
prediction_df_ = prediction_df.copy()
make_my_predictions_1(target_df_, prediction_df_)
 actual_ = np.array([0.0] * 199)
 actual_[yard_to_index[target_df_['Yards'].iloc[0]]:] = 1.0
loss_ =(prediction_df_.iloc[0,:] - actual_)*(prediction_df_.iloc[0,:] - actual_)
 loss.append(loss_.mean())
 print(np.array(loss ).mean() )