1. 29 Mar, 2021 1 commit
  2. 20 Mar, 2021 2 commits
    • Philippe Veber's avatar
    • Philippe Veber's avatar
      tk/Mutsel_simulator_cpg: initial speed assessment · 8f248d0d
      Philippe Veber authored
      using (debugged) implementation in phylogenetics, perform simulation
      for 500 to 2000 sites. Quadratic complexity is expected here, to
      observe it I use the log transform from
      
      	t = K n^2
      
      to
      	log t = 2 log n + log K
      
      Running times are only nearly quadratic:
      
      > df <- data.frame(n = c(500,1000,1300,2000), t = c(5.15,18.48,28.63,68.07)) ; fit <- lm(log2(t) ~ log2(n), data = df) ; summary(fit)
      
      Call:
      lm(formula = log2(t) ~ log2(n), data = df)
      
      Residuals:
              1         2         3         4
       0.015095  0.007796 -0.061122  0.038231
      
      Coefficients:
                   Estimate Std. Error t value Pr(>|t|)
      (Intercept) -14.24278    0.36390  -39.14 0.000652 ***
      log2(n)       1.85062    0.03608   51.30 0.000380 ***
      ---
      Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
      
      Residual standard error: 0.05237 on 2 degrees of freedom
      Multiple R-squared:  0.9992,	Adjusted R-squared:  0.9989
      F-statistic:  2631 on 1 and 2 DF,  p-value: 0.0003798
      
      Using a quadratic fit is nevertheless not so bad:
      
      > df <- data.frame(n = c(500,1000,1300,2000), t = c(5.15,18.48,28.63,68.07)) ; fit <- lm(t ~ I(n^2), data = df) ; summary(fit)
      
      Call:
      lm(formula = t ~ I(n^2), data = df)
      
      Residuals:
            1       2       3       4
      -0.1138  0.6815 -0.7004  0.1327
      
      Coefficients:
                   Estimate Std. Error t value Pr(>|t|)
      (Intercept) 1.086e+00  5.581e-01   1.945 0.191208
      I(n^2)      1.671e-05  2.501e-07  66.822 0.000224 ***
      ---
      Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
      
      Residual standard error: 0.702 on 2 degrees of freedom
      Multiple R-squared:  0.9996,	Adjusted R-squared:  0.9993
      F-statistic:  4465 on 1 and 2 DF,  p-value: 0.0002239
      8f248d0d
  3. 19 Mar, 2021 1 commit
  4. 15 Mar, 2021 2 commits
  5. 11 Mar, 2021 4 commits
  6. 10 Mar, 2021 1 commit
  7. 09 Mar, 2021 1 commit