Skip to content

Commit

Permalink
chapter 5 - fix bug in main score for multiple halos
Browse files Browse the repository at this point in the history
  • Loading branch information
Yossi Synett committed Oct 24, 2018
1 parent 45efc52 commit cdd693c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Chapter5_LossFunctions/DarkWorldsMetric.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ def main_score( nhalo_all, x_true_all, y_true_all, x_ref_all, y_ref_all, sky_pre
x_predicted=np.array([],dtype=float)
y_predicted=np.array([],dtype=float)
for i in range(nhalo):
x_predicted=np.append(x_predicted,float(sky[0])) #get the predicted values
y_predicted=np.append(y_predicted,float(sky[1]))
x_predicted=np.append(x_predicted,float(sky[2*i])) #get the predicted values
y_predicted=np.append(y_predicted,float(sky[2*i+1]))
#The solution file for the test data provides masses
#to calculate the centre of mass where as the Training_halo.csv
#direct provides x_ref y_ref. So in the case of test data
Expand Down

0 comments on commit cdd693c

Please sign in to comment.