View source: R/plot_summary_print_HD.R
print.SNSeg_HD | R Documentation |
Print method for objects of class SNSeg_HD
## S3 method for class 'SNSeg_HD'
print(x, ...)
x |
a |
... |
not in use |
n <- 500
p <- 50
nocp <- 5
cp_sets <- round(seq(0,nocp+1,1)/(nocp+1)*n)
num_entry <- 5
kappa <- sqrt(4/5)
mean_shift <- rep(c(0,kappa),100)[1:(length(cp_sets)-1)]
set.seed(1)
ts <- matrix(rnorm(n*p,0,1),n,p)
no_seg <- length(cp_sets)-1
for(index in 1:no_seg){
tau1 <- cp_sets[index]+1
tau2 <- cp_sets[index+1]
ts[tau1:tau2,1:num_entry] <- ts[tau1:tau2,1:num_entry] +
mean_shift[index]
}
# grid_size defined
result <- SNSeg_HD(ts, confidence = 0.9, grid_size_scale = 0.05,
grid_size = 40)
# print method
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.