tests/testthat/_snaps/matrix/mrf-penalty.md

linear mrf_penalty with a numeric

Code
  print(as.matrix(pen))
Output
      1  2  3  4  5  6  7  8  9 10
  1   1 -1  0  0  0  0  0  0  0  0
  2  -1  2 -1  0  0  0  0  0  0  0
  3   0 -1  2 -1  0  0  0  0  0  0
  4   0  0 -1  2 -1  0  0  0  0  0
  5   0  0  0 -1  2 -1  0  0  0  0
  6   0  0  0  0 -1  2 -1  0  0  0
  7   0  0  0  0  0 -1  2 -1  0  0
  8   0  0  0  0  0  0 -1  2 -1  0
  9   0  0  0  0  0  0  0 -1  2 -1
  10  0  0  0  0  0  0  0  0 -1  1

cyclic mrf_penalty with a numeric

Code
  print(as.matrix(pen))
Output
           1  2  3  4  5  6  7  8  9      10
  1   500001 -1  0  0  0  0  0  0  0 -500000
  2       -1  2 -1  0  0  0  0  0  0       0
  3        0 -1  2 -1  0  0  0  0  0       0
  4        0  0 -1  2 -1  0  0  0  0       0
  5        0  0  0 -1  2 -1  0  0  0       0
  6        0  0  0  0 -1  2 -1  0  0       0
  7        0  0  0  0  0 -1  2 -1  0       0
  8        0  0  0  0  0  0 -1  2 -1       0
  9        0  0  0  0  0  0  0 -1  2      -1
  10 -500000  0  0  0  0  0  0  0 -1  500001

cyclic mrf_penalty with a numeric and user end points

Code
  print(as.matrix(pen))
Output
        1  2  3  4  5  6  7  8  9   10
  1   1.5 -1  0  0  0  0  0  0  0 -0.5
  2  -1.0  2 -1  0  0  0  0  0  0  0.0
  3   0.0 -1  2 -1  0  0  0  0  0  0.0
  4   0.0  0 -1  2 -1  0  0  0  0  0.0
  5   0.0  0  0 -1  2 -1  0  0  0  0.0
  6   0.0  0  0  0 -1  2 -1  0  0  0.0
  7   0.0  0  0  0  0 -1  2 -1  0  0.0
  8   0.0  0  0  0  0  0 -1  2 -1  0.0
  9   0.0  0  0  0  0  0  0 -1  2 -1.0
  10 -0.5  0  0  0  0  0  0  0 -1  1.5

fully connected mrf_penalty with a factor

Code
  print(as.matrix(pen))
Output
     a  b  c  d  e  f  g  h  i  j
  a  9 -1 -1 -1 -1 -1 -1 -1 -1 -1
  b -1  9 -1 -1 -1 -1 -1 -1 -1 -1
  c -1 -1  9 -1 -1 -1 -1 -1 -1 -1
  d -1 -1 -1  9 -1 -1 -1 -1 -1 -1
  e -1 -1 -1 -1  9 -1 -1 -1 -1 -1
  f -1 -1 -1 -1 -1  9 -1 -1 -1 -1
  g -1 -1 -1 -1 -1 -1  9 -1 -1 -1
  h -1 -1 -1 -1 -1 -1 -1  9 -1 -1
  i -1 -1 -1 -1 -1 -1 -1 -1  9 -1
  j -1 -1 -1 -1 -1 -1 -1 -1 -1  9

ranef mrf_penalty with a factor

Code
  print(as.matrix(pen))
Output
    a b c d e f g h i j
  a 1 0 0 0 0 0 0 0 0 0
  b 0 1 0 0 0 0 0 0 0 0
  c 0 0 1 0 0 0 0 0 0 0
  d 0 0 0 1 0 0 0 0 0 0
  e 0 0 0 0 1 0 0 0 0 0
  f 0 0 0 0 0 1 0 0 0 0
  g 0 0 0 0 0 0 1 0 0 0
  h 0 0 0 0 0 0 0 1 0 0
  i 0 0 0 0 0 0 0 0 1 0
  j 0 0 0 0 0 0 0 0 0 1

mrf_penalty with a dendrogram

Code
  print(as.matrix(pen))
Output
                 Seattle LosAngeles SanFrancisco     Miami   NewYork
  Seattle        6376.66  -3188.330    -3188.330     0.000     0.000
  LosAngeles    -3188.33   7012.886    -3824.557     0.000     0.000
  SanFrancisco  -3188.33  -3824.557     7012.886     0.000     0.000
  Miami             0.00      0.000        0.000 14237.907 -2686.799
  NewYork           0.00      0.000        0.000 -2686.799 16223.411
  Washington.DC     0.00      0.000        0.000 -2686.799 -4051.305
  Atlanta           0.00      0.000        0.000 -2686.799 -2997.298
  Chicago           0.00      0.000        0.000 -2686.799 -2997.298
  Denver            0.00      0.000        0.000 -1745.356 -1745.356
  Houston           0.00      0.000        0.000 -1745.356 -1745.356
                Washington.DC   Atlanta   Chicago    Denver   Houston
  Seattle               0.000     0.000     0.000     0.000     0.000
  LosAngeles            0.000     0.000     0.000     0.000     0.000
  SanFrancisco          0.000     0.000     0.000     0.000     0.000
  Miami             -2686.799 -2686.799 -2686.799 -1745.356 -1745.356
  NewYork           -4051.305 -2997.298 -2997.298 -1745.356 -1745.356
  Washington.DC     16223.411 -2997.298 -2997.298 -1745.356 -1745.356
  Atlanta           -2997.298 15524.736 -3352.631 -1745.356 -1745.356
  Chicago           -2997.298 -3352.631 15524.736 -1745.356 -1745.356
  Denver            -1745.356 -1745.356 -1745.356 11290.880 -2564.102
  Houston           -1745.356 -1745.356 -1745.356 -2564.102 11290.880

mrf_penalty with a hclust

Code
  print(as.matrix(pen))
Output
                 Seattle LosAngeles SanFrancisco     Miami   NewYork
  Seattle        6376.66  -3188.330    -3188.330     0.000     0.000
  LosAngeles    -3188.33   7012.886    -3824.557     0.000     0.000
  SanFrancisco  -3188.33  -3824.557     7012.886     0.000     0.000
  Miami             0.00      0.000        0.000 14237.907 -2686.799
  NewYork           0.00      0.000        0.000 -2686.799 16223.411
  Washington.DC     0.00      0.000        0.000 -2686.799 -4051.305
  Atlanta           0.00      0.000        0.000 -2686.799 -2997.298
  Chicago           0.00      0.000        0.000 -2686.799 -2997.298
  Denver            0.00      0.000        0.000 -1745.356 -1745.356
  Houston           0.00      0.000        0.000 -1745.356 -1745.356
                Washington.DC   Atlanta   Chicago    Denver   Houston
  Seattle               0.000     0.000     0.000     0.000     0.000
  LosAngeles            0.000     0.000     0.000     0.000     0.000
  SanFrancisco          0.000     0.000     0.000     0.000     0.000
  Miami             -2686.799 -2686.799 -2686.799 -1745.356 -1745.356
  NewYork           -4051.305 -2997.298 -2997.298 -1745.356 -1745.356
  Washington.DC     16223.411 -2997.298 -2997.298 -1745.356 -1745.356
  Atlanta           -2997.298 15524.736 -3352.631 -1745.356 -1745.356
  Chicago           -2997.298 -3352.631 15524.736 -1745.356 -1745.356
  Denver            -1745.356 -1745.356 -1745.356 11290.880 -2564.102
  Houston           -1745.356 -1745.356 -1745.356 -2564.102 11290.880


eric-pedersen/MRFtools documentation built on Jan. 28, 2024, 2:13 a.m.