gpr.py 805 Bytes
Newer Older
Malthe Kjær Bisbo's avatar
Malthe Kjær Bisbo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import numpy as np
from kernel import gauss_kernel, double_gauss_kernel

class gpr():
    """Gaussian Process Regression
    
    Parameters:
    
    descriptor:
    
    kernel:
    
    prior:
    """
    def __init__(self, descriptor, kernel, prior):
        self.descriptor = descriptor
        if kernel is None:
            kernel = gauss_kernel()
        else:
            self.kernel = kernel
        self.prior = prior

    def predict(self, a):
        x = self.descriptor.get_feature(a)
        k = self.kernel.kernel_vector(x, self.X)

        f = k.T.dot(self.alpha) + self.bias + delta
    
    def train(self):
        pass

    def optimize_hyperparameters(self):
        pass

    def neg_log_likelihood(self):
        pass

    

def func(self, x):
    dsafas

def name():
    """