Running ‘testthat.R’ [179s/300s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # MixtComp version 4 - july 2019
  > # Copyright (C) Inria - Université de Lille - CNRS 
  > 
  > # This program is free software: you can redistribute it and/or modify
  > # it under the terms of the GNU Affero General Public License as
  > # published by the Free Software Foundation, either version 3 of the
  > # License, or (at your option) any later version.
  > # This program is distributed in the hope that it will be useful,
  > # but WITHOUT ANY WARRANTY; without even the implied warranty of
  > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > # GNU Affero General Public License for more details.
  > # 
  > # You should have received a copy of the GNU Affero General Public License
  > # along with this program.  If not, see <https://www.gnu.org/licenses/>
  >  
  > 
  > library(testthat)
  > library(RMixtComp)
  Loading required package: RMixtCompUtilities
  > 
  > test_check("RMixtComp")
  ====== Run Hierarchical MixtComp in  mode with 1 run(s) per number of classes and 1 core(s)
  Data:  individuals and 3 variables.
  -- K = 2
  Number of splits to perform: 1
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Compute criterion
  Run time: 0.035s
  -- K = 3
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Compute criterion
  Start run 1
  Run 1 DONE 
  Start run 1
  Run 1 DONE 
  Run time: 0.166s
  -- K = 4
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Split a cluster in two
  Start run 1
  Run 1 DONE 
   Compute criterion
  Start run 1
  Run 1 DONE 
  Start run 1
  Run 1 DONE 
  Start run 1
  Run 1 DONE 
  Run time: 0.141s
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
           cont         categ         poiss 
     "Gaussian" "Multinomial"     "Poisson" 
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 3 variables.
  -- K = 2
  Start run 1
  Run 1 DONE 
  Run completed in 0.043s
  Total runtime: 0.098s
  Best model according to BIC: 2 clusters.
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
           cont        categ1        categ2         poiss 
     "Gaussian" "Multinomial" "Multinomial"     "Poisson" 
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 4 variables.
  -- K = 2
  Start run 1
  Run 1 DONE 
  Run completed in 0.052s
  Total runtime: 0.121s
  Best model according to BIC: 2 clusters.
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
           cont         poiss       z_class 
     "Gaussian"     "Poisson" "LatentClass" 
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 3 variables.
  -- K = 2
  Start run 1
  Run 1 DONE 
  Run completed in 0.021s
  Total runtime: 0.091s
  Best model according to BIC: 2 clusters.
  You did not provide a model parameter.
  Data are assumed to follow R standard and not MixtComp standard.
  Models will be imputed as follows: "Gaussian" for numeric variable, "Multinomial" for character or factor variable and "Poisson" for integer variable.
  If a variable is named "z_class" and its type is character, factor or integer, it will be used as "LatentClass".
   Sepal.Length   Sepal.Width  Petal.Length   Petal.Width       z_class 
     "Gaussian"    "Gaussian"    "Gaussian"    "Gaussian" "LatentClass" 
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 150 individuals and 5 variables.
  -- K = 3
  Start run 1
  Run 1 DONE 
  Run completed in 0.037s
  Total runtime: 0.134s
  Best model according to BIC: 3 clusters.
  ── 1. Failure: mixtCompLearn works + mixtCompPredict (@test.runWrapper.R#230)  ─
  RMixtCompIO:::rand.index(getPartition(resLearn), resGen$z) is not more than 0.85. Difference: -0.164
  
     
        1   2   3   4
    1  67  11 119   0
    2   3 306   0   0
    3  60  32   2  58
    4   4 336   2   0
  ====== Run MixtComp in learn mode with 5 run(s) per number of classes and 2 core(s)
  Data: 1000 individuals and 2 variables.
  -- K = 2
  starting worker pid=28892 on localhost:11206 at 06:22:33.428
  starting worker pid=29148 on localhost:11206 at 06:22:33.906
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 1 on thread number 28892
  Start run 2 on thread number 29148
  Run 2 DONE on thread number 29148
  Start run 3 on thread number 29148
  Run 1 DONE on thread number 28892
  Start run 4 on thread number 28892
  Run 3 DONE on thread number 29148
  Run 4 DONE on thread number 28892
  Start run 5 on thread number 29148
  Run 5 DONE on thread number 29148
  Run completed in 2.405s
  -- K = 3
  starting worker pid=29808 on localhost:11206 at 06:22:35.738
  starting worker pid=30032 on localhost:11206 at 06:22:36.360
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 2 on thread number 30032
  Start run 1 on thread number 29808
  Run 1 DONE on thread number 29808
  Start run 3 on thread number 29808
  Run 2 DONE on thread number 30032
  Start run 4 on thread number 30032
  Run 3 DONE on thread number 29808
  Start run 5 on thread number 29808
  Run 4 DONE on thread number 30032
  Run 5 DONE on thread number 29808
  Run completed in 2.691s
  -- K = 4
  starting worker pid=31000 on localhost:11206 at 06:22:38.513
  starting worker pid=31311 on localhost:11206 at 06:22:39.079
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 2 on thread number 31311
  Start run 1 on thread number 31000
  Run 2 DONE on thread number 31311
  Run 1 DONE on thread number 31000
  Start run 3 on thread number 31311
  Start run 4 on thread number 31000
  Run 3 DONE on thread number 31311
  Run 4 DONE on thread number 31000
  Start run 5 on thread number 31311
  Run 5 DONE on thread number 31311
  Run completed in 2.968s
  -- K = 5
  starting worker pid=32359 on localhost:11206 at 06:22:41.523
  starting worker pid=314 on localhost:11206 at 06:22:42.208
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 1 on thread number 32359
  Start run 2 on thread number 314
  Run 2 DONE on thread number 314
  Start run 3 on thread number 314
  Run 1 DONE on thread number 32359
  Start run 4 on thread number 32359
  Run 3 DONE on thread number 314
  Start run 5 on thread number 314
  Run 4 DONE on thread number 32359
  Run 5 DONE on thread number 314
  Run completed in 3.779s
  Total runtime: 11.844s
  Best model according to BIC: 4 clusters.
     
        1   2   3   4
    1   2 185   4   6
    2  20   8 279   2
    3   3   4   0 145
    4 329   4   7   2
  ############### MixtCompLearn Run ###############
  nClass: 2 3 4 5 
  Criterion used: BIC 
              2         3         4         5
  BIC -2461.951 -2411.174 -2278.631 -2286.324
  ICL -2500.881 -2468.730 -2376.589 -2385.818
  Best model: 4 clusters 
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 4 
  Mode: learn 
  Time: 0.302 s
  SEM burn-in iterations done: 93/100 
  SEM run iterations done: 11/100 
  Observed log-likelihood: -2240.638 
  BIC: -2278.631 
  ICL: -2376.589 
  Discriminative power:
  Gaussian1 
      0.907 
  Proportions of the mixture:
  0.346 0.198 0.306 0.15 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1  2.040 0.532
  k: 2 -5.048 1.011
  k: 3  5.044 0.944
  k: 4 -2.014 0.533
  ####################################
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 2 
  Mode: learn 
  Time: 0.296 s
  SEM burn-in iterations done: 37/100 
  SEM run iterations done: 11/100 
  Observed log-likelihood: -2444.682 
  BIC: -2461.951 
  ICL: -2500.881 
  Discriminative power:
  Gaussian1 
      0.906 
  Proportions of the mixture:
  0.351 0.649 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1 -3.751 1.747
  k: 2  3.392 1.741
  ####################################
  $nClass: 2 3 4 5 
  $criterion:  BIC 
  $crit: 
              2         3         4         5
  BIC -2461.951 -2411.174 -2278.631 -2286.324
  ICL -2500.881 -2468.730 -2376.589 -2385.818
  
   Best result
  $algo
  $algo$nInd: 1000 
  $algo$nClass: 4 
  $algo$mode: learn 
  	 Other outputs: nbBurnInIter nbIter nbGibbsBurnInIter nbGibbsIter nSemTry nInitPerClass confidenceLevel ratioStableCriterion nStableCriterion basicMode hierarchicalMode 
  
  $mixture
  $mixture$lnObservedLikelihood: -2240.638 
  $mixture$nbFreeParameters: 11 
  $mixture$BIC: -2278.631 
  $mixture$ICL: -2376.589 
  	 Other outputs: runTime lnCompletedLikelihood IDClass lnProbaGivenClass completedProbabilityLogBurnIn completedProbabilityLogRun delta 
  
  $variable
  $variable$type
  $variable$type$z_class :  LatentClass 
  $variable$type$Gaussian1 :  Gaussian 
  
  $variable$data
  $variable$data$z_class$completed:  2 2 3 4 3 4 ...
  $variable$data$z_class$stat:
        k: 1 k: 2 k: 3 k: 4
  [1,]    0    1    0    0
  [2,]    0    1    0    0
  [3,]    0    0    1    0
  [4,]    0    0    0    1
  [5,]    0    0    1    0
  [6,]    0    0    0    1
  
  	 Other variables: Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.346   0.3500000    0.3441176
  k: 2  0.198   0.1979592    0.2019608
  k: 3  0.306   0.3071429    0.3029412
  k: 4  0.150   0.1448980    0.1509804
  $variable$param$Gaussian1: 
                   median q 2.500000% q 97.500000%
  k: 1, mean:   2.0404742   2.0248026    2.0570494
  k: 1, sd      0.5324881   0.5064471    0.5411406
  k: 2, mean:  -5.0481302  -5.0951317   -4.9393277
  k: 2, sd      1.0106291   0.9510867    1.0886880
  k: 3, mean:   5.0435153   5.0066859    5.0634371
  k: 3, sd      0.9441168   0.9286985    0.9926710
  k: 4, mean:  -2.0144022  -2.0350806   -1.9661451
  k: 4, sd      0.5333884   0.4947222    0.5459410
  
   $res: results from all MixtComp Run
  $algo
  $algo$nInd: 1000 
  $algo$nClass: 2 
  $algo$mode: learn 
  	 Other outputs: nbBurnInIter nbIter nbGibbsBurnInIter nbGibbsIter nSemTry nInitPerClass confidenceLevel ratioStableCriterion nStableCriterion basicMode hierarchicalMode 
  
  $mixture
  $mixture$lnObservedLikelihood: -2444.682 
  $mixture$nbFreeParameters: 5 
  $mixture$BIC: -2461.951 
  $mixture$ICL: -2500.881 
  	 Other outputs: runTime lnCompletedLikelihood IDClass lnProbaGivenClass completedProbabilityLogBurnIn completedProbabilityLogRun delta 
  
  $variable
  $variable$type
  $variable$type$z_class :  LatentClass 
  $variable$type$Gaussian1 :  Gaussian 
  
  $variable$data
  $variable$data$z_class$completed:  1 1 2 1 2 1 ...
  $variable$data$z_class$stat:
        k: 1 k: 2
  [1,] 1.00 0.00
  [2,] 1.00 0.00
  [3,] 0.00 1.00
  [4,] 0.92 0.08
  [5,] 0.00 1.00
  [6,] 0.72 0.28
  
  	 Other variables: Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.351   0.3481332    0.3508424
  k: 2  0.649   0.6518668    0.6491576
  $variable$param$Gaussian1: 
                  median q 2.500000% q 97.500000%
  k: 1, mean:  -3.751442   -3.811782    -3.700997
  k: 1, sd      1.747056    1.687324     1.776480
  k: 2, mean:   3.392305    3.334258     3.407797
  k: 2, sd      1.741024    1.709296     1.772312
  Start run 1
  Run 1 DONE 
  ====== Run Hierarchical MixtComp in learn mode with 2 run(s) per number of classes and 2 core(s)
  Data: 200 individuals and 3 variables.
  -- K = 2
  Number of splits to perform: 1
   Split a cluster in two
  starting worker pid=2889 on localhost:11206 at 06:22:46.646
  starting worker pid=3123 on localhost:11206 at 06:22:47.312
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 1 on thread number 2889
  Start run 2 on thread number 3123
  Run 1 DONE on thread number 2889
  Run 2 DONE on thread number 3123
   Compute criterion
  Run time: 11.348s
  -- K = 3
  Number of splits to perform: 2
   Split a cluster in two
  starting worker pid=8261 on localhost:11206 at 06:22:58.009
  starting worker pid=8493 on localhost:11206 at 06:22:58.671
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 1 on thread number 8261
  Start run 2 on thread number 8493
  Run 2 DONE on thread number 8493
  Run 1 DONE on thread number 8261
   Split a cluster in two
  starting worker pid=12144 on localhost:11206 at 06:23:06.618
  starting worker pid=12572 on localhost:11206 at 06:23:07.239
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 2 on thread number 12572
  Start run 1 on thread number 12144
  Run 2 DONE on thread number 12572
  Run 1 DONE on thread number 12144
   Compute criterion
  starting worker pid=14944 on localhost:11206 at 06:23:11.403
  starting worker pid=15424 on localhost:11206 at 06:23:12.016
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 1 on thread number 14944
  Start run 2 on thread number 15424
  Run 2 DONE on thread number 15424
  Run 1 DONE on thread number 14944
  starting worker pid=21979 on localhost:11206 at 06:23:21.448
  starting worker pid=22332 on localhost:11206 at 06:23:22.043
  Loading required package: RMixtCompIO
  Loading required package: RMixtCompIO
  loaded RMixtCompIO and set parent environment
  loaded RMixtCompIO and set parent environment
  Start run 1 on thread number 21979
  Start run 2 on thread number 22332
  Run 1 DONE on thread number 21979
  Run 2 DONE on thread number 22332
  Run time: 33.168s
  Total runtime: 44.577s
  Best model according to BIC: 2 clusters.
  ############### MixtCompLearn Run ###############
  nClass: 2 3 
  Criterion used: BIC 
              2         3
  BIC -23057.51 -23075.89
  ICL -23057.51 -23116.35
  Best model: 2 clusters 
  ########### MixtComp Run ###########
  Number of individuals: 200 
  Number of variables: 2 
  Number of clusters: 2 
  Mode: learn 
  Time: 7.584 s
  SEM burn-in iterations done: 11/50 
  SEM run iterations done: 11/50 
  Observed log-likelihood: -23001.88 
  BIC: -23057.51 
  ICL: -23057.51 
  Discriminative power:
  Functional1   Gaussian1 
        1.000       0.959 
  Proportions of the mixture:
  0.685 0.315 
  Parameters of the most discriminant variables:
  - Functional1: Func_CS 
  $alpha
       s:1, alpha0 s:1, alpha1 s:2, alpha0 s:2, alpha1
  k: 1           0           0    -841.320      83.539
  k: 2           0           0    -593.027      59.425
  
  $beta
       s:1, c:1 s:1, c:2 s:2, c:1 s:2, c:2
  k: 1    8.294   -0.990  -11.768    1.007
  k: 2    1.665    1.001   21.755   -1.006
  
  $sd
         s:1   s:2
  k: 1 0.760 0.738
  k: 2 0.742 0.757
  
  - Gaussian1: Gaussian 
         mean    sd
  k: 1  4.927 1.147
  k: 2 -4.936 0.983
  ####################################
  ########### MixtComp Run ###########
  Number of individuals: 200 
  Number of variables: 2 
  Number of clusters: 2 
  Mode: learn 
  Time: 7.584 s
  SEM burn-in iterations done: 11/50 
  SEM run iterations done: 11/50 
  Observed log-likelihood: -23001.88 
  BIC: -23057.51 
  ICL: -23057.51 
  Discriminative power:
  Functional1   Gaussian1 
        1.000       0.959 
  Proportions of the mixture:
  0.685 0.315 
  Parameters of the most discriminant variables:
  - Functional1: Func_CS 
  $alpha
       s:1, alpha0 s:1, alpha1 s:2, alpha0 s:2, alpha1
  k: 1           0           0    -841.320      83.539
  k: 2           0           0    -593.027      59.425
  
  $beta
       s:1, c:1 s:1, c:2 s:2, c:1 s:2, c:2
  k: 1    8.294   -0.990  -11.768    1.007
  k: 2    1.665    1.001   21.755   -1.006
  
  $sd
         s:1   s:2
  k: 1 0.760 0.738
  k: 2 0.742 0.757
  
  - Gaussian1: Gaussian 
         mean    sd
  k: 1  4.927 1.147
  k: 2 -4.936 0.983
  ####################################
  $nClass: 2 3 
  $criterion:  BIC 
  $crit: 
              2         3
  BIC -23057.51 -23075.89
  ICL -23057.51 -23116.35
  
   Best result
  $algo
  $algo$nInd: 200 
  $algo$nClass: 2 
  $algo$mode: learn 
  	 Other outputs: nbBurnInIter nbIter nbGibbsBurnInIter nbGibbsIter nSemTry nInitPerClass confidenceLevel ratioStableCriterion nStableCriterion basicMode hierarchicalMode 
  
  $mixture
  $mixture$lnObservedLikelihood: -23001.88 
  $mixture$nbFreeParameters: 21 
  $mixture$BIC: -23057.51 
  $mixture$ICL: -23057.51 
  	 Other outputs: runTime lnCompletedLikelihood IDClass lnProbaGivenClass completedProbabilityLogBurnIn completedProbabilityLogRun delta 
  
  $variable
  $variable$type
  $variable$type$z_class :  LatentClass 
  $variable$type$Functional1 :  Func_CS 
  $variable$type$Gaussian1 :  Gaussian 
  
  $variable$data
  $variable$data$z_class$completed:  1 2 1 2 2 1 ...
  $variable$data$z_class$stat:
        k: 1 k: 2
  [1,]    1    0
  [2,]    0    1
  [3,]    1    0
  [4,]    0    1
  [5,]    0    1
  [6,]    1    0
  
  	 Other variables: Functional1 Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.685       0.685        0.685
  k: 2  0.315       0.315        0.315
  $variable$param$Functional1: 
  NULL
  $variable$param$Gaussian1: 
                   median q 2.500000% q 97.500000%
  k: 1, mean:   4.9267297   4.8829403     4.973790
  k: 1, sd      1.1468825   1.1178092     1.205620
  k: 2, mean:  -4.9358763  -4.9503902    -4.902463
  k: 2, sd      0.9827081   0.9673104     1.004068
  
   $res: results from all MixtComp Run
  $algo
  $algo$nInd: 200 
  $algo$nClass: 2 
  $algo$mode: learn 
  	 Other outputs: nbBurnInIter nbIter nbGibbsBurnInIter nbGibbsIter nSemTry nInitPerClass confidenceLevel ratioStableCriterion nStableCriterion 
  
  $mixture
  $mixture$lnObservedLikelihood: -23001.88 
  $mixture$nbFreeParameters: 21 
  $mixture$BIC: -23057.51 
  $mixture$ICL: -23057.51 
  	 Other outputs: runTime lnCompletedLikelihood IDClass lnProbaGivenClass completedProbabilityLogBurnIn completedProbabilityLogRun delta 
  
  $variable
  $variable$type
  $variable$type$z_class :  LatentClass 
  $variable$type$Functional1 :  Func_CS 
  $variable$type$Gaussian1 :  Gaussian 
  
  $variable$data
  $variable$data$z_class$completed:  1 2 1 2 2 1 ...
  $variable$data$z_class$stat:
        k: 1 k: 2
  [1,]    1    0
  [2,]    0    1
  [3,]    1    0
  [4,]    0    1
  [5,]    0    1
  [6,]    1    0
  
  	 Other variables: Functional1 Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.685       0.685        0.685
  k: 2  0.315       0.315        0.315
  $variable$param$Functional1: 
  NULL
  $variable$param$Gaussian1: 
                   median q 2.500000% q 97.500000%
  k: 1, mean:   4.9267297   4.8829403     4.973790
  k: 1, sd      1.1468825   1.1178092     1.205620
  k: 2, mean:  -4.9358763  -4.9503902    -4.902463
  k: 2, sd      0.9827081   0.9673104     1.004068
  Start run 1
  Run 1 DONE 
  $warnLog
  [1] "Crash."
  
  ====== Run MixtComp in learn mode with 1 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 8 variables.
  -- K = 2
  Start run 1
  double free or corruption (out)
  Aborted