TDA in R - Filter_Value Argument

Hi All,

I've recently been trying to use some TDA in R, yet one limitation I have found is in the selection of the "filter values" argument.

My understanding is that they typically use the range of X-axis for the "filter_values" argument, but I've had no success.

Here is a published example:

devtools::install_github("paultpearson/TDAmapper")
devtools::install_github("christophergandrud/networkD3")

library(TDAmapper)
library(igraph)

#DATA 

n_x <- c(rep(-.5,101),0.01*(-50:50),rep(.5,101))
n_y <- c(0.02*(-50:50),-0.02*(-50:50),0.02*(-50:50))

d_x <- c(rep(-0.9,101),0.02*(-50:25),0.02*(-50:25),
         0.4+sqrt(0.5^2-(0.01*(-50:50))^2))
d_y <- c(0.01*(-50:50),rep(0.5,76),rep(-0.5,76),
         0.01*(-50:50))

nd <- data.frame(x=c(n_x,d_x),y=c(n_y,d_y))
plot(nd)

#MAPPER EXAMPLE - FILTER VALUES ARGUMENT

m <- mapper1D(
     distance_matrix = dist(nd),
     filter_values = c(n_x,d_x),
     num_intervals = 10,
     percent_overlap = 50,
     num_bins_when_clustering = 10)

However, I wondered if someone could help me select the filter_values argument on something like the trial data expressed below, with a range of 1:3 (much more characteristic of my own data).

Would be appreciated.

x1 = rep(1:3, times = 100)
x2 = rep(1:3, times = 100)
x3 = rep(1:3, times = 100)
x4 = rep(1:3, times = 100)
x5 = rep(1:3, times = 100)

DAT <- data.frame(x1, x2,x3,x4,x5)

Many thanks.

Links

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.