mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
Adapt likelihoods init to check for sympy.
This commit is contained in:
commit
19b3784389
5 changed files with 17 additions and 9 deletions
|
|
@ -4,7 +4,7 @@
|
|||
import itertools
|
||||
import numpy
|
||||
from parameter_core import OptimizationHandlable, adjust_name_for_printing
|
||||
from array_core import ObsAr
|
||||
from observable_array import ObsAr
|
||||
|
||||
###### printing
|
||||
__constraints_name__ = "Constraint"
|
||||
|
|
|
|||
|
|
@ -4,11 +4,19 @@ from gaussian import Gaussian
|
|||
from gamma import Gamma
|
||||
from poisson import Poisson
|
||||
from student_t import StudentT
|
||||
from sstudent_t import SstudentT
|
||||
from likelihood import Likelihood
|
||||
from mixed_noise import MixedNoise
|
||||
from symbolic import Symbolic
|
||||
from negative_binomial import Negative_binomial
|
||||
from skew_normal import Skew_normal
|
||||
from skew_exponential import Skew_exponential
|
||||
from null_category import Null_category
|
||||
# TODO need to fix this in a config file.
|
||||
try:
|
||||
import sympy as sym
|
||||
sympy_available=True
|
||||
except ImportError:
|
||||
sympy_available=False
|
||||
if sympy_available:
|
||||
# These are likelihoods that rely on symbolic.
|
||||
from symbolic import Symbolic
|
||||
from sstudent_t import SstudentT
|
||||
from negative_binomial import Negative_binomial
|
||||
from skew_normal import Skew_normal
|
||||
from skew_exponential import Skew_exponential
|
||||
from null_category import Null_category
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import unittest
|
|||
import GPy
|
||||
import numpy as np
|
||||
from GPy.core.parameterization.parameter_core import HierarchyError
|
||||
from GPy.core.parameterization.array_core import ObsAr
|
||||
from GPy.core.parameterization.observable_array import ObsAr
|
||||
|
||||
class ArrayCoreTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from GPy.core.parameterization.index_operations import ParameterIndexOperations,
|
|||
ParameterIndexOperationsView
|
||||
import tempfile
|
||||
from GPy.core.parameterization.param import Param
|
||||
from GPy.core.parameterization.array_core import ObsAr
|
||||
from GPy.core.parameterization.observable_array import ObsAr
|
||||
from GPy.core.parameterization.priors import Gaussian
|
||||
from GPy.kern._src.rbf import RBF
|
||||
from GPy.kern._src.linear import Linear
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue