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

Calculate VCV from the results of minimize function #55

Open
FuZhiyu opened this issue Jan 15, 2018 · 1 comment
Open

Calculate VCV from the results of minimize function #55

FuZhiyu opened this issue Jan 15, 2018 · 1 comment

Comments

@FuZhiyu
Copy link

FuZhiyu commented Jan 15, 2018

In the notebook MLest, we use
vcv_mle = results.hess_inv * OffDiagNeg
to obtain the VCV. However, results.hess_inv is not a ndarray but a scipy.optimize.LbfgsInvHessProduct object, which will interpret '*' as dot multiplication instead of pointwise multiplication, thus generating irregular VCV result.
Instead, we should use:
vcv_mle = results.hess_inv.todense() * OffDiagNeg
i.e., transform it to a dense matrix, and then do the pointwise multiplication.

@rickecon
Copy link
Contributor

@FuZhiyu . That is correct. The .todense() method will extract a sparse matrix from the results output. Then do the pointwise transformation.

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