Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about BayesianRegression #42

Open
Keneyr opened this issue Dec 26, 2023 · 1 comment
Open

question about BayesianRegression #42

Keneyr opened this issue Dec 26, 2023 · 1 comment

Comments

@Keneyr
Copy link

Keneyr commented Dec 26, 2023

why self.w_cov = np.linalg.inv(self.w_precision) in fit function?
what's the meaning of w_cov?
why y_var = 1 / self.beta + np.sum(x @ self.w_cov * x, axis=1) in predict function ?

Can anybody give me a clue or some knowledge about this? Thanks

@said-ml
Copy link

said-ml commented Feb 4, 2024

for the first question in statistic covariance matrix is inverse of precision matrix, as python code within in class (we access to argument through self) and using inv method from the package numpy.linalg we can write self.w_cov = np.linalg.inv(self.w_precision) in fit function because over all the because (at lest most of it the objective is to find out the weights )and the implementation direct of the result of the prdictive distribution page 156 equation (3-59) where here we take the basis function phi(X)=X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants