rrrlw/TDAstats

allow `calculate_homology` to return data frames

Closed this issue · 4 comments

rrrlw commented

Currently, TDAstats::calculate_homology only returns a matrix. When converted to a data frame with as.data.frame, users need to convert the dimension column to a factor (instead of numeric) to accurately plot colors in barcode (allow discrete colors instead of quantitative color spectrum). Easy fix would be to add parameter that returns a properly formatted data frame to users so that they don't have to do any extra steps.

rrrlw commented

Instead of just calculate_homology, will have all functions (e.g. including plot_* functions) work w/ data frames as default instead of numeric matrices

Hi! When I use calculate_homology over a graph with 7 vertices (for example) I only obtain 6 features at dimension 0 and that start with a filtration weight 0, why is that? Shouldn't be 7 features? I couldn't find the reason in your guidelines or vignettes.
Thanks!

rrrlw commented

Hi @SPRADA1, this is a great question. Would you be willing to open a new issue in this repository with the same text above so that I can address it independently from the upcoming change with calculate_homology?

rrrlw commented

fixed in port to ripser (around 8e937b4)