Running ‘testthat.R’ [211s/233s]
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 on thread number 6467
  Run 1 DONE on thread number 6467
   Compute criterion
  Run time: 0.082s
  -- K = 3
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
   Split a cluster in two
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
   Compute criterion
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Run time: 0.149s
  -- K = 4
  Number of splits to perform: 2
   Split a cluster in two
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
   Split a cluster in two
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
   Compute criterion
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Run time: 0.174s
  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 3 run(s) per number of classes and 1 core(s)
  Data: 200 individuals and 3 variables.
  -- K = 2
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 2 on thread number 6467
  Run 2 DONE on thread number 6467
  Start run 3 on thread number 6467
  Run 3 DONE on thread number 6467
  Run completed in 0.163s
  Total runtime: 0.166s
  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 on thread number 6467
  Run 1 DONE on thread number 6467
  Run completed in 0.103s
  Total runtime: 0.147s
  Best model according to BIC: 2 clusters.
  ── 1. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#7
  RMixtCompIO:::rand.index(getPartition(resLearn), rep(1:2, each = 100)) is not more than 0.95. Difference: -0.123
  
  ── 2. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#9
  RMixtCompIO:::rand.index(getPartition(resPredict), rep(1:2, each = 100)) is not more than 0.95. Difference: -0.123
  
  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 on thread number 6467
  Run 1 DONE on thread number 6467
  Run completed in 0.064s
  Total runtime: 0.094s
  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 on thread number 6467
  Run 1 DONE on thread number 6467
  Run completed in 0.107s
  Total runtime: 0.161s
  Best model according to BIC: 3 clusters.
     
        1   2   3   4
    1   6  17 361  10
    2  32  11   4 597
    3   4 293   8   2
    4 618   1   9  27
  ====== Run MixtComp in learn mode with 5 run(s) per number of classes and 1 core(s)
  Data: 1000 individuals and 2 variables.
  -- K = 2
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 2 on thread number 6467
  Run 2 DONE on thread number 6467
  Start run 3 on thread number 6467
  Run 3 DONE on thread number 6467
  Start run 4 on thread number 6467
  Run 4 DONE on thread number 6467
  Start run 5 on thread number 6467
  Run 5 DONE on thread number 6467
  Run completed in 1.815s
  -- K = 3
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 2 on thread number 6467
  Run 2 DONE on thread number 6467
  Start run 3 on thread number 6467
  Run 3 DONE on thread number 6467
  Start run 4 on thread number 6467
  Run 4 DONE on thread number 6467
  Start run 5 on thread number 6467
  Run 5 DONE on thread number 6467
  Run completed in 1.704s
  -- K = 4
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 2 on thread number 6467
  Run 2 DONE on thread number 6467
  Start run 3 on thread number 6467
  Run 3 DONE on thread number 6467
  Start run 4 on thread number 6467
  Run 4 DONE on thread number 6467
  Start run 5 on thread number 6467
  Run 5 DONE on thread number 6467
  Run completed in 2.057s
  -- K = 5
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  Start run 2 on thread number 6467
  Run 2 DONE on thread number 6467
  Start run 3 on thread number 6467
  Run 3 DONE on thread number 6467
  Start run 4 on thread number 6467
  Run 4 DONE on thread number 6467
  Start run 5 on thread number 6467
  Run 5 DONE on thread number 6467
  Run completed in 5.819s
  Total runtime: 11.396s
  Best model according to BIC: 4 clusters.
     
        1   2   3   4
    1   4   5 186   2
    2  19 284   2   4
    3   1   2   6 143
    4 330   7   2   3
  ############### MixtCompLearn Run ###############
  nClass: 2 3 4 5 
  Criterion used: BIC 
              2         3         4         5
  BIC -2461.942 -2330.645 -2278.533 -2287.368
  ICL -2497.807 -2400.975 -2372.550 -2514.493
  Best model: 4 clusters 
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 4 
  Mode: learn 
  Time: 0.384 s
  SEM burn-in iterations done: 100/100 
  SEM run iterations done: 100/100 
  Observed log-likelihood: -2240.54 
  BIC: -2278.533 
  ICL: -2372.55 
  Discriminative power:
  Gaussian1 
      0.905 
  Proportions of the mixture:
  0.342 0.302 0.204 0.152 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1  2.037 0.532
  k: 2  5.031 0.969
  k: 3 -5.038 1.012
  k: 4 -2.002 0.522
  ####################################
  ########### MixtComp Run ###########
  Number of individuals: 1000 
  Number of variables: 1 
  Number of clusters: 2 
  Mode: learn 
  Time: 0.298 s
  SEM burn-in iterations done: 100/100 
  SEM run iterations done: 100/100 
  Observed log-likelihood: -2444.673 
  BIC: -2461.942 
  ICL: -2497.807 
  Discriminative power:
  Gaussian1 
      0.906 
  Proportions of the mixture:
  0.35 0.65 
  Parameters of the most discriminant variables:
  - Gaussian1: Gaussian 
         mean    sd
  k: 1 -3.750 1.744
  k: 2  3.383 1.744
  ####################################
  $nClass: 2 3 4 5 
  $criterion:  BIC 
  $crit: 
              2         3         4         5
  BIC -2461.942 -2330.645 -2278.533 -2287.368
  ICL -2497.807 -2400.975 -2372.550 -2514.493
  
   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.54 
  $mixture$nbFreeParameters: 11 
  $mixture$BIC: -2278.533 
  $mixture$ICL: -2372.55 
  	 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:  3 3 2 4 2 4 ...
  $variable$data$z_class$stat:
        k: 1 k: 2 k: 3 k: 4
  [1,] 0.00 0.00    1    0
  [2,] 0.00 0.00    1    0
  [3,] 0.00 1.00    0    0
  [4,] 0.00 0.00    0    1
  [5,] 0.01 0.99    0    0
  [6,] 0.00 0.00    0    1
  
  	 Other variables: Gaussian1 
  
  $variable$param
  $variable$param$z_class: 
       median q 2.500000% q 97.500000%
  k: 1  0.342   0.3465140    0.3378248
  k: 2  0.302   0.3048907    0.2993263
  k: 3  0.204   0.2070760    0.2117421
  k: 4  0.152   0.1415193    0.1511068
  $variable$param$Gaussian1: 
                   median q 2.500000% q 97.500000%
  k: 1, mean:   2.0368490   2.0108745    2.0666027
  k: 1, sd      0.5322860   0.5143025    0.5573295
  k: 2, mean:   5.0305376   4.9703913    5.0895969
  k: 2, sd      0.9685228   0.9070852    1.0237983
  k: 3, mean:  -5.0382261  -5.0986519   -4.8983542
  k: 3, sd      1.0119752   0.9479392    1.1347026
  k: 4, mean:  -2.0019943  -2.0447592   -1.9427409
  k: 4, sd      0.5224255   0.4862742    0.5589261
  
   $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.673 
  $mixture$nbFreeParameters: 5 
  $mixture$BIC: -2461.942 
  $mixture$ICL: -2497.807 
  	 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.91 0.09
  [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.3503504   0.3478702     0.352071
  k: 2 0.6496496   0.6521298     0.647929
  $variable$param$Gaussian1: 
                  median q 2.500000% q 97.500000%
  k: 1, mean:  -3.750172   -3.817590    -3.676033
  k: 1, sd      1.744179    1.689448     1.812533
  k: 2, mean:   3.383077    3.319081     3.426656
  k: 2, sd      1.743715    1.695385     1.802446
  Start run 1 on thread number 6467
  Run 1 DONE on thread number 6467
  $warnLog
  [1] "Crash."
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 371 | SKIPPED: 2 | WARNINGS: 2 | FAILED: 2 ]
  1. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#74) 
  2. Failure: mixtCompLearn works in basic mode + predict (@test.runWrapper.R#95) 
  
  Error: testthat unit tests failed
  Execution halted