def theta_hat(H_hat=None, h_hat=None, lambdaRegularizer=0.0, kernelBasis=None) :
"""
Calculates theta_hat given H_hat, h_hat, lambda, and the kernel basis function
Treat as a system of lienar equations and find the exact, optimal
solution
"""
theta_hat = linalg.solve(H_hat + (lambdaRegularizer * numpy.eye(kernelBasis)), h_hat)
return theta_hat
评论列表
文章目录