-
Notifications
You must be signed in to change notification settings - Fork 18
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
114 inconsistency between fitted and predict #115
Conversation
I agree with you, no need to send back M or S as attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- change to 1.1.0
- check comment on adding .5 * S² or not
## mean latent positions in the parameter space | ||
EZ <- X %*% private$B | ||
if (!is.null(O)) EZ <- EZ + O | ||
EZ <- sweep(EZ, 2, .5 * diag(self$model_par$Sigma), "+") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you do not add this back in the update version, so it was indeed a mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I looked at predict_cond()
and it made me realize that
Lines 560 to 564 in 4a68804
results <- switch( | |
type, | |
link = EZ + M, | |
response = exp(EZ + M + 0.5 * S) | |
) |
46db73e
to
4a68804
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright then !
I am preparing a new CRAN submission based on master branch
Fix #114 by changing behavior of
predict()
method (and corresponding S3-methods) for PLNfit objects:newdata
argument is missing, returns fittednewdata
is provided but notresponses
, returns eitherlink
type) orresponse
type) as the best estimates ofresponses
is also provided, performs one VE step to estimatelink
type) orresponse
type)Open question for @jchiquet : should we return$M_{new}$ and $S_{new}$ as attributes of the predictions (like we do for
predict_cond()
? I think there's not a lot of added value compared to usingoptimize_vestep()
if one is mostly interested in M and S but you may have a different opinion.