invenia / Impute.jl

Imputation methods for missing data in julia
https://invenia.github.io/Impute.jl/latest/
Other
77 stars 11 forks source link

Change matrix orientation #23

Closed rofinn closed 5 years ago

rofinn commented 5 years ago

From #17

rofinn commented 5 years ago

We should probably have a minor release with a deprecation about this.

nickrobinson251 commented 5 years ago

Should have a dims keyword?

rofinn commented 5 years ago

I'd rather not provide the option to minimize confusion.

rofinn commented 5 years ago

Based on a recommendation from Curtis I've introduced a vardim kwarg to the Imputor constructors and imputation convenience functions. The vardim field in the Imputor is ignored unless we're operating on matrices.

nickrobinson251 commented 5 years ago

Since we usually operate on each variate in turn (not each observation) it makes sense for variates to be in columns by default?

Neither JuliaStats nor Invenia have consistent orientation across all packages, I suggest the best way forward is "do what the computer likes"; AFAIU Julia stored arrays in column-major, so acting column-by-column is usually faster than row-by-row, so let's have the thing we operate on most be the thing in the columns for any given package, and let's offer a dims/obsdims/vardims keyword for being explicit and flexible?

rofinn commented 5 years ago

That's true, but we already do that with tables. I don't expect people to be applying univariate methods to matrices as often as tables. In the future we'll have methods that only work on matrices using MultivariateStats.jl and Distributions.jl.