示例#1
0
 def hyperparameters(self):
     '''A hierarchical representation of all the kernel hyperparameters.'''
     return pretty_tuple('MarginalizedGraphKernel', [
         'starting_probability', 'stopping_probability', 'node_kernel',
         'edge_kernel'
     ])(self.p.theta, self.q, self.node_kernel.theta,
        self.edge_kernel.theta)
示例#2
0
文件: fix.py 项目: yhtang/GraphDot
 def hyperparameter_bounds(self):
     return pretty_tuple(
         'Exponentiation',
         ['xi', 'kernel']
     )(
         self.xi_bounds, self.kernel.hyperparameter_bounds
     )
示例#3
0
 def hyperparameter_bounds(self):
     if self.s_bounds == "fixed":
         return self.kernel.hyperparameter_bounds
     else:
         return pretty_tuple('GraphKernelHyperparameterBounds', [
             'starting_probability', 'stopping_probability', 'node_kernel',
             'edge_kernel', 'normalize_size'
         ])(self.kernel.p.bounds, self.kernel.q_bounds,
            self.kernel.node_kernel.bounds, self.kernel.edge_kernel.bounds,
            self.s_bounds)
示例#4
0
 def hyperparameters(self):
     if self.s_bounds == "fixed":
         return self.kernel.hyperparameters
     else:
         return pretty_tuple('MarginalizedGraphKernel', [
             'starting_probability', 'stopping_probability', 'node_kernel',
             'edge_kernel', 'normalize_size'
         ])(self.kernel.p.theta, self.kernel.q,
            self.kernel.node_kernel.theta, self.kernel.edge_kernel.theta,
            np.log(self.s))
示例#5
0
 def theta(self):
     return pretty_tuple(self.name, ['h'])(self.h)
示例#6
0
 def theta(self):
     return pretty_tuple(
         self.name,
         self._theta_values.keys()
     )(**self._theta_values)
示例#7
0
 def theta(self):
     return pretty_tuple(self.name, ['lhs', 'rhs'])(
         self.k1.theta, self.k2.theta
     )
示例#8
0
 def theta(self):
     return pretty_tuple(self.name, self.kw_kernels.keys())(
         *[k.theta for k in self.kw_kernels.values()])
示例#9
0
 def bounds(self):
     return pretty_tuple(self.name, self.kw_kernels.keys())(
         *[k.bounds for k in self.kw_kernels.values()])
示例#10
0
 def hyperparameter_bounds(self):
     return pretty_tuple('GraphKernelHyperparameterBounds', [
         'starting_probability', 'stopping_probability', 'node_kernel',
         'edge_kernel'
     ])(self.p.bounds, self.q_bounds, self.node_kernel.bounds,
        self.edge_kernel.bounds)
示例#11
0
 def hyperparameters(self):
     return pretty_tuple('Kernel', ['v', 'L'])(self.v, self.L)
示例#12
0
 def theta(self):
     return pretty_tuple(self.name, ['base'])(self.kernel.theta)
示例#13
0
 def hyperparameters(self):
     return pretty_tuple('RBFKernel',
                         list(self._hyperparams.keys()) +
                         ['distance'])(*self._hyperparams.values(),
                                       self.distance.hyperparameters)
示例#14
0
 def theta(self):
     return pretty_tuple('Uniform', ['p'])(self.p)