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

type arg in predict.fpca? #11

Open
jeff-goldsmith opened this issue Jul 13, 2020 · 1 comment
Open

type arg in predict.fpca? #11

jeff-goldsmith opened this issue Jul 13, 2020 · 1 comment

Comments

@jeff-goldsmith
Copy link
Collaborator

right now predict.fpca returns a tfb object (coefs from scores, basis from fpca). makes a lot of sense, but sometimes people just want the scores and not the fitted values. can we handle that with type?

ideally this will work smoothly with modelr etc too

@jeff-goldsmith
Copy link
Collaborator Author

just a couple more thoughts on this -- sort of related to 7c0fc0e

i wrote a function that extracts scores from an fpca object, of the kind returned by rfr_fpca. that object is a bit different from what you'd get from predict.fpca (which is just a tfb ...). so, for predict, you can convert the tfb to an fpca object and then extract scores.

kinda clunky, but i'm not sure exactly how users are likely to interact with tfbs and fpca objects. i suppose we could extract scores from either using the same function, or encourage users to convert tfbs to full fpca things if they want to worry about FPCA stuff (and not just represent data using a basis expansion).

also, am i just completely missing some easier option? do we make it simple to extract coefficients from tfb objects in tidyfun ..?

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

1 participant