Description Usage Arguments Value Examples
Robustness of log-Euclidean and Bayes geometries to MRI-induced noise
| 1 | robustness_analysis(tensor, n = 8L, B = 1000L, N = 20L, seed = NULL)
 | 
| tensor | A reference tensor. | 
| n | Sample size (default:  | 
| B | Number of independent noisy samples (default:  | 
| N | Number of healthy subjects used to build hypothetical template
(default:  | 
| seed | Seed for random number generation (default: clock time). | 
A tibble with simulation results.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | arrow <- ggplot2::arrow(length = ggplot2::unit(0.4, "cm"), type = "closed")
refIsotropicTensor <- diag(3e-3, 3L)
data_isotropic <- robustness_analysis(refIsotropicTensor, B = 100L, seed = 1234)
data_isotropic$data %>%
 ggplot2::ggplot(ggplot2::aes(x = Sigma, y = MSE, col = Space)) +
 ggplot2::geom_point() +
 ggplot2::geom_line() +
 ggplot2::theme_minimal() +
 ggplot2::theme(legend.position = "top",
                axis.line = ggplot2::element_line(arrow = arrow)) +
 ggplot2::facet_grid(Metric ~ ., scales = "free") +
 ggplot2::scale_x_continuous(labels = scales::percent) +
 ggplot2::scale_y_log10()
refAnisotropicTensor <- diag(c(1.71e-3, 3e-4, 1e-4))
data_fascicles <- tibble::tibble()
theta <- pi * c(0, 1/6, 1/4, 1/3, 1/2)
for (a in theta) {
 R <- rbind(
   c(cos(a), sin(a), 0),
   c(-sin(a), cos(a), 0),
   c(0, 0, 1)
 )
 ref_tmp <- R %*% refAnisotropicTensor %*% t(R)
 tmp <- robustness_analysis(ref_tmp, B = 100L, seed = 1234)
 data_fascicles <- dplyr::bind_rows(
   data_fascicles,
   tmp$data %>% dplyr::mutate(Angle = round(a, 4L))
 )
}
data_fascicles %>%
  ggplot2::ggplot(ggplot2::aes(x = Sigma, y = MSE, col = Space)) +
  ggplot2::geom_point() +
  ggplot2::geom_line() +
  ggplot2::theme_minimal() +
  ggplot2::theme(legend.position = "top",
                 axis.line = ggplot2::element_line(arrow = arrow)) +
  ggplot2::facet_grid(Metric ~ Angle, scales = "free") +
  ggplot2::scale_x_continuous(labels = scales::percent) +
  ggplot2::scale_y_log10()
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.