mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 00:32:39 +02:00
NegativeLogexp Pep8ted
This commit is contained in:
parent
269cc84253
commit
3b40a47cbc
2 changed files with 2 additions and 2 deletions
|
|
@ -195,7 +195,7 @@ class Parameterized(object):
|
||||||
|
|
||||||
def constrain_negative(self, regexp):
|
def constrain_negative(self, regexp):
|
||||||
""" Set negative constraints. """
|
""" Set negative constraints. """
|
||||||
self.constrain(regexp, transformations.Negative_logexp())
|
self.constrain(regexp, transformations.NegativeLogexp())
|
||||||
|
|
||||||
def constrain_positive(self, regexp):
|
def constrain_positive(self, regexp):
|
||||||
""" Set positive constraints. """
|
""" Set positive constraints. """
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class Logexp(Transformation):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '(+ve)'
|
return '(+ve)'
|
||||||
|
|
||||||
class Negative_logexp(Transformation):
|
class NegativeLogexp(Transformation):
|
||||||
domain = NEGATIVE
|
domain = NEGATIVE
|
||||||
def f(self, x):
|
def f(self, x):
|
||||||
return -Logexp.f(x) # np.log(1. + np.exp(x))
|
return -Logexp.f(x) # np.log(1. + np.exp(x))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue