Running ‘A_lambda_run_tests.R’
  Running ‘B_fit_consistency_tests.R’
  Running ‘B_fit_run_tests_0.R’ [23s/27s]
Running the tests in ‘tests/B_fit_run_tests_0.R’ failed.
Complete output:
  > # SMALL CRAN TEST
  > 
  > library(sglOptim)
  Loading required package: Matrix
  Loading required package: foreach
  Loading required package: doParallel
  Loading required package: iterators
  Loading required package: parallel
  > library(tools)
  > 
  > source("units/run_tests.R")
  > source("units/generate_data.R")
  > source("units/fit_test.R")
  > 
  > # warnings = errors
  > options(warn=2)
  > set.seed(100) #  ensures consistency of tests
  > 
  > # Run the tests
  > 
  > ## create data
  > data <- create_test_data()
  > 
  > ## Possible args values
  > values <- expand.grid(
  +   grouping = list(
  +     NULL,
  +     factor(1:ncol(data$X) %% 3)
  +   ),
  +   groupWeights = list(NULL),
  +   parameterWeights = list(NULL),
  +   alpha = c(0, 0.5, 1),
  +   d = 50,
  +   lambda.min = 0.9,
  +   lambda.min.rel = TRUE,
  +   response = list(
  +     NULL,
  +     "link"
  +   )
  + )
  > 
  > ## consistency args values
  > consistency <- expand.grid(
  +   sparseX = c(FALSE, TRUE),
  +   sparseY = c(FALSE, TRUE),
  +   objective = "linear_test_identity"
  + )
  > 
  > run_tests(
  +   data = data,
  +   args_values = values,
  +   args_consistency = consistency,
  +   test = fit_test,
  +   check_consistency = check_fit_consistency
  + )
  [1] "doing test 1 1"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  1     NULL         NULL             NULL     0 50        0.9           TRUE
    response
  1     NULL
    sparseX sparseY            objective
  1   FALSE   FALSE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          1            5
        10     0.98          1            5
        20     0.96          1            5
        30     0.94          2           10
        40     0.92          2           10
        50     0.90          2           10
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 19.1 19.059 19.018 ... 17.19
  [1] "doing test 1 2"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  1     NULL         NULL             NULL     0 50        0.9           TRUE
    response
  1     NULL
    sparseX sparseY            objective
  2    TRUE   FALSE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          1            5
        10     0.98          1            5
        20     0.96          1            5
        30     0.94          2           10
        40     0.92          2           10
        50     0.90          2           10
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 19.1 19.059 19.018 ... 17.19
  [1] "doing test 1 3"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  1     NULL         NULL             NULL     0 50        0.9           TRUE
    response
  1     NULL
    sparseX sparseY            objective
  3   FALSE    TRUE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          1            5
        10     0.98          1            5
        20     0.96          1            5
        30     0.94          2           10
        40     0.92          2           10
        50     0.90          2           10
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 19.1 19.059 19.018 ... 17.19
  [1] "doing test 1 4"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  1     NULL         NULL             NULL     0 50        0.9           TRUE
    response
  1     NULL
    sparseX sparseY            objective
  4    TRUE    TRUE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          1            5
        10     0.98          1            5
        20     0.96          1            5
        30     0.94          2           10
        40     0.92          2           10
        50     0.90          2           10
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 19.1 19.059 19.018 ... 17.19
  [1] "doing test 2 1"
                                       grouping groupWeights parameterWeights
  2 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1         NULL             NULL
    alpha  d lambda.min lambda.min.rel response
  2     0 50        0.9           TRUE     NULL
    sparseX sparseY            objective
  1   FALSE   FALSE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          5           25
        20     0.96          5           25
        30     0.94          5           25
        40     0.92          5           25
        50     0.90          5           25
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 32.25 32.181 32.112 ... 29.025
  [1] "doing test 2 2"
                                       grouping groupWeights parameterWeights
  2 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1         NULL             NULL
    alpha  d lambda.min lambda.min.rel response
  2     0 50        0.9           TRUE     NULL
    sparseX sparseY            objective
  2    TRUE   FALSE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          5           25
        20     0.96          5           25
        30     0.94          5           25
        40     0.92          5           25
        50     0.90          5           25
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 32.25 32.181 32.112 ... 29.025
  [1] "doing test 2 3"
                                       grouping groupWeights parameterWeights
  2 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1         NULL             NULL
    alpha  d lambda.min lambda.min.rel response
  2     0 50        0.9           TRUE     NULL
    sparseX sparseY            objective
  3   FALSE    TRUE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          5           25
        20     0.96          5           25
        30     0.94          5           25
        40     0.92          5           25
        50     0.90          5           25
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 32.25 32.181 32.112 ... 29.025
  [1] "doing test 2 4"
                                       grouping groupWeights parameterWeights
  2 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1         NULL             NULL
    alpha  d lambda.min lambda.min.rel response
  2     0 50        0.9           TRUE     NULL
    sparseX sparseY            objective
  4    TRUE    TRUE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          5           25
        20     0.96          5           25
        30     0.94          5           25
        40     0.92          5           25
        50     0.90          5           25
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 32.25 32.181 32.112 ... 29.025
  [1] "doing test 3 1"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  3     NULL         NULL             NULL   0.5 50        0.9           TRUE
    response
  3     NULL
    sparseX sparseY            objective
  1   FALSE   FALSE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          1            2
        20     0.96          1            2
        30     0.94          1            2
        40     0.92          1            2
        50     0.90          1            2
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 16.522 16.486 16.451 ... 14.87
  [1] "doing test 3 2"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  3     NULL         NULL             NULL   0.5 50        0.9           TRUE
    response
  3     NULL
    sparseX sparseY            objective
  2    TRUE   FALSE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          1            2
        20     0.96          1            2
        30     0.94          1            2
        40     0.92          1            2
        50     0.90          1            2
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 16.522 16.486 16.451 ... 14.87
  [1] "doing test 3 3"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  3     NULL         NULL             NULL   0.5 50        0.9           TRUE
    response
  3     NULL
    sparseX sparseY            objective
  3   FALSE    TRUE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          1            2
        20     0.96          1            2
        30     0.94          1            2
        40     0.92          1            2
        50     0.90          1            2
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 16.522 16.486 16.451 ... 14.87
  [1] "doing test 3 4"
    grouping groupWeights parameterWeights alpha  d lambda.min lambda.min.rel
  3     NULL         NULL             NULL   0.5 50        0.9           TRUE
    response
  3     NULL
    sparseX sparseY            objective
  4    TRUE    TRUE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  
  Call:
  NULL
  
  Models:
  
   Index:  Lambda:  Features:  Parameters: 
         1     1.00          0            0
        10     0.98          1            2
        20     0.96          1            2
        30     0.94          1            2
        40     0.92          1            2
        50     0.90          1            2
  
  
  Call:
  NULL
  
  Predictions for 15 samples at 50 lambda values.
  
  Lambda values: 16.522 16.486 16.451 ... 14.87
  [1] "doing test 4 1"
                                       grouping groupWeights parameterWeights
  4 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1         NULL             NULL
    alpha  d lambda.min lambda.min.rel response
  4   0.5 50        0.9           TRUE     NULL
    sparseX sparseY            objective
  1   FALSE   FALSE linear_test_identity
  0%   10   20   30   40   50   60   70   80   90   100%
  |----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  Error in sgl_fit(module_name = module, PACKAGE = "sglOptim", data = data,  : 
    The algorithm has encountered a convergence problem
     Try/check the following:
     (1) Check the lambda sequence and try with a longer sequence (the length d should be larger than 100) 
     (2) try with a larger lambda.min
     (3) Ensure minimum one sample from each group/class present in all subsample (or cross validation) sets used 
   (Assert failed in ../inst/include/sgl/sgl_optimizer.h at line 234 )
  Calls: run_tests -> test -> sgl_fit -> .Call
  Execution halted