Skip to content

Commit

Permalink
Corrected mistake in gradients: Was finding d(Xi-Xj)/dOffset instead …
Browse files Browse the repository at this point in the history
…of dr/dOffset. Fixed by scaling by kernel lengthscale.
  • Loading branch information
lionfish0 committed Aug 4, 2016
1 parent 04bcf56 commit ebe4a49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GPy/models/gp_offset_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ def dr_doffset(self,X,sel,delta):
#print Gs[i]
#print w
dr_doffsets.append(dr_doffset)

#lastly we need to divide by the lengthscale: So far we've found d(X_i - X_j)/dOffsets
#we want dr/dOffsets. (X_i - X_j)/lengthscale = r
dr_doffsets /= self.kern.lengthscale
return dr_doffsets

def parameters_changed(self):
Expand Down

0 comments on commit ebe4a49

Please sign in to comment.