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

_return_predictions should always run the Tables.materializer #249

Open
rafaqz opened this issue Nov 10, 2021 · 0 comments
Open

_return_predictions should always run the Tables.materializer #249

rafaqz opened this issue Nov 10, 2021 · 0 comments

Comments

@rafaqz
Copy link

rafaqz commented Nov 10, 2021

For most predict return types Tables.materializer is called. But the AbstractVector method just returns a vector: https://github.com/JuliaStats/StatsModels.jl/blob/master/src/statsmodel.jl#L149-L154
For some objects it would be preferable if it called the materializer with T((; predictions = out)).

For example, a DimensionalData.jl/Rasters.jl stack or array can be used as a table, but it cant get a stack/array back without Tables.materializer being called. This means predict on multimensional spatial variables returns non-spatial single dimension predictions that have to be manually reshaped, instead of it being automatic.

This will probably be a breaking change.

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