JuliaStats / MultivariateStats.jl

A Julia package for multivariate statistics and data analysis (e.g. dimension reduction)
Other
379 stars 86 forks source link

Restrict output height of PCA model representation #195

Open wildart opened 2 years ago

wildart commented 2 years ago

Related to #186.

nalimilan commented 2 years ago

How about mentioning that dimensions are not printed as they don't fit on screen? It could make sense to print the command that allows printing all results, as it's not easy to find.

wildart commented 2 years ago

It could make sense to print the command that allows printing all results, as it's not easy to find.

Good idea, will do.

FedeClaudi commented 2 years ago

Was adding a comment on the original issue (https://github.com/JuliaStats/MultivariateStats.jl/issues/186) but will add my 2 cents here instead.

First, thanks for the package, awesome work.

For the layout problem raised in the issue, I would suggest Term's Tables for styled terminal output. Disclaimer: I'm Term's developer so I'm a bit biased. I'm happy to put together a PR showing how that would look.


I also have an additional gripe with the current output. Currently, it prints out a whole lot of information (not sure if it's the data it was fitted on, or the PC loadings). That's fine for small examples, but I forgot to add ; while fitting a HUGE table and it has been printing values to the console for like 5 minutes now, still going. Realistically, one would not visually inspect large tables of numbers like that, I really don't see the point of printing it out. Also, there's methods to easily display that information if one really wants to have a look, but I don't think it should be the default.

Looking forwards to seeing what you think!

wildart commented 2 years ago

For the layout problem raised in the issue, I would suggest Term's Tables for styled terminal output.

The table layout and handling comes from StatsBase.CoefTable, so the work needs to be done there.

there's methods to easily display that information if one really wants to have a look, but I don't think it should be the default.

In #195, I put several limits on default output, but main work needs to be done in CoefTable - make it adjustable (see https://github.com/JuliaStats/StatsBase.jl/pull/794).

Thanks for comments.

FedeClaudi commented 2 years ago

Got it, thanks for the reply and the excellent work!