castbreakpoints {clusterpath} | R Documentation |
Cast the variables in a clusterpath l1 data frame into the columns of a new data frame, to facilitate plotting in [23]d. In practice this is quite a bit faster than brute-force plotting all points returned by predict.clusterpath.
castbreakpoints(df)
df |
clusterpath data frame. |
Data frame with a row for every breakpoint in the dimensionality of the problem, suitable for plotting with lines in the high dimension to represent the entire linear path of optimal solutions for the l1 problem.
Toby Dylan Hocking
sim <- gendata(N=10,D=2,K=2) df <- clusterpath.l1.id(sim$mat) system.time(str(castbreakpoints(df))) system.time(str(predict(df))) system.time(str(castbreakpoints(predict(df))))