mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-24 14:15:14 +02:00
linear fix
This commit is contained in:
parent
283b0745aa
commit
2feb849bf7
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ from ...util.linalg import tdot
|
||||||
from ...util.misc import fast_array_equal, param_to_array
|
from ...util.misc import fast_array_equal, param_to_array
|
||||||
from ...core.parameterization import Param
|
from ...core.parameterization import Param
|
||||||
from ...core.parameterization.transformations import Logexp
|
from ...core.parameterization.transformations import Logexp
|
||||||
|
from ...util.caching import Cache_this
|
||||||
|
|
||||||
class Linear(Kern):
|
class Linear(Kern):
|
||||||
"""
|
"""
|
||||||
|
|
@ -61,7 +62,7 @@ class Linear(Kern):
|
||||||
else:
|
else:
|
||||||
return self._dot_product(X, X2) * self.variances
|
return self._dot_product(X, X2) * self.variances
|
||||||
|
|
||||||
@Cache_this(limit=1, ignore_args(0,))
|
@Cache_this(limit=1, ignore_args=(0,))
|
||||||
def _dot_product(self, X, X2=None):
|
def _dot_product(self, X, X2=None):
|
||||||
if X2 is None:
|
if X2 is None:
|
||||||
return tdot(X)
|
return tdot(X)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue