Skip to content

Low feature count and high relative parallel cores causes error #3

Description

@mmahmoudian

When running on few features, SIVS throws error:

library(sivs)

# prepare toy data
data <- subset(iris, subset = Species != "setosa")

dim(data)
    # 100   5

# run sivs
sivs_obj <- sivs::sivs(x              = data[, -5],
                       y              = factor(data[, 5]),
                       parallel.cores = 4,
                       progressbar    = F)

which produces

Error in apply(coef.df, 1, function(f) { : 
  dim(X) must have a positive length
In addition: Warning messages:
1: In `[<-.data.frame`(`*tmp*`, , tmp.columns.to.zscore, value = list( :
  provided 400 variables to replace 4 variables
2:    The method you have chosen is "glmnet" and it cannot handle missing values. The
   provided data as 'x' argument contains 400 missing values. In total 100 rows
   containing missing values were removed. 
3:    The method "glmnet" needs the argument 'family' to be filled. Since it was not
   provided by the user and based on the factor levels of 'y' argument, the value
   of argument 'family' has set to "binomial".

The error goes away if the parallel.cores is 3 or less, or even FALSE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions