gesso model in R
0
0
Entering edit mode
17 months ago
Eliza ▴ 30

Hi I am trying to run a gesso model as discribed here:https://cran.r-project.org/web/packages/gesso/gesso.pdf

This is my code :

tune_model = gesso.cv(G_train, e_train, y_train, grid_size=50, parallel=TRUE, nfolds=3)

My G_train matrix has of size: 17 * 50, y_train and e_train are vectors of length 17 and my model is "binomial"

Sadly I get the following error:

Error in seq.default(log10(lambda_min), log10(lambda_max), length.out
= grid_size) :    'from' must be a finite number

and I don't understand what is the problem would be happy for your help :)

I tried expirementing with different data sets . when my data looked like this:

enter image description here

it worked , but as i wanted to use more variables and incresed my column size for 30 it again produced the error

gesso R • 843 views
ADD COMMENT
0
Entering edit mode

There is a step in gesso.cv where it returns Inf, to reproduce the error, try:

seq.default(log10(1), log10(3), length.out = 5)
# [1] 0.0000000 0.1192803 0.2385606 0.3578409 0.4771213

log10(0)
# [1] -Inf
seq.default(log10(0), log10(3), length.out = 5)
# Error in seq.default(log10(0), log10(3), length.out = 5) : 
#   'from' must be a finite number

I am guessing your input data is wrong, provide example data to reproduce the error. Or you can explore their GitHub codes: https://github.com/NataliaZemlianskaia/gesso

ADD REPLY
0
Entering edit mode

@zx8754 Hi, my G_train matrix is of size 17*50 it has the values 0 or 1 indicating if a certain SNP is present for a patient ( 17 patients and 50 SNPs). y_train is a vector of length 17 with also values 0 or 1 indicating if a patient is sick or not and the E_train is also a vector of length 17 with values 0 or 1 and it looks simillar to the way thet generated the data . ... so Im a little bit cluless

ADD REPLY

Login before adding your answer.

Traffic: 1561 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6