Skip to content

Commit

Permalink
Adapt to restructuration in Deck
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan H committed Oct 30, 2018
1 parent 2c63e4e commit a06b0e3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions GPSO.m
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@

self.info('\tHyperparameter update (nsplit=%d).',upn);
self.srgt.gp_update();
upn = dk.math.nextint( Nsplit/upc );
upn = dk.num.nextint( Nsplit/upc );
self.notify( 'PostUpdate' );

end
Expand All @@ -313,7 +313,7 @@

self.info('\tHyperparameter update (nsplit=%d).',upn);
self.srgt.gp_update();
upn = dk.math.nextint( (sqrt(1+8*Nsplit/upc)-1)/2 );
upn = dk.num.nextint( (sqrt(1+8*Nsplit/upc)-1)/2 );
self.notify( 'PostUpdate' );

end
Expand Down
4 changes: 2 additions & 2 deletions GP_Surrogate.m
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@
@infExact, self.GP.meanfunc, self.GP.covfunc, self.GP.likfunc, xe, fe );

% don't allow scale parameters to become too small or too big
self.GP.hyp.lik = dk.math.clamp( self.GP.hyp.lik, self.LIK_BND );
self.GP.hyp.cov(1) = dk.math.clamp( self.GP.hyp.cov(1), self.COV_BND );
self.GP.hyp.lik = dk.num.clamp( self.GP.hyp.lik, self.LIK_BND );
self.GP.hyp.cov(1) = dk.num.clamp( self.GP.hyp.cov(1), self.COV_BND );

% re-evaluate all gp-based samples
if self.Ng > 0
Expand Down
4 changes: 2 additions & 2 deletions dev/GPSO_v2.m
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@

self.info('\tHyperparameter update (n=%d).',upn);
self.srgt.gp_update();
upn = dk.math.nextint( Nsplit/upc );
upn = dk.num.nextint( Nsplit/upc );
self.notify( 'PostUpdate' );

end
Expand All @@ -285,7 +285,7 @@

self.info('\tHyperparameter update (n=%d).',upn);
self.srgt.gp_update();
upn = dk.math.nextint( (sqrt(1+8*Nsplit/upc)-1)/2 );
upn = dk.num.nextint( (sqrt(1+8*Nsplit/upc)-1)/2 );
self.notify( 'PostUpdate' );

end
Expand Down
4 changes: 2 additions & 2 deletions dev/GPSO_v3.m
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@

self.info('\tHyperparameter update (n=%d).',upn);
self.srgt.gp_update();
upn = dk.math.nextint( Nsplit/upc );
upn = dk.num.nextint( Nsplit/upc );
self.notify( 'PostUpdate' );

end
Expand All @@ -303,7 +303,7 @@

self.info('\tHyperparameter update (n=%d).',upn);
self.srgt.gp_update();
upn = dk.math.nextint( (sqrt(1+8*Nsplit/upc)-1)/2 );
upn = dk.num.nextint( (sqrt(1+8*Nsplit/upc)-1)/2 );
self.notify( 'PostUpdate' );

end
Expand Down
2 changes: 1 addition & 1 deletion dev/GP_Surrogate_v3.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
@infExact, self.GP.meanfunc, self.GP.covfunc, self.GP.likfunc, xe, fe );

% don't allow sigma to become too small or too big
self.GP.hyp.lik = dk.math.clamp( self.GP.hyp.lik, self.LIK_BND );
self.GP.hyp.lik = dk.num.clamp( self.GP.hyp.lik, self.LIK_BND );

% re-evaluate all gp-based samples
if self.Ng > 0
Expand Down

0 comments on commit a06b0e3

Please sign in to comment.