Code Monkey home page Code Monkey logo

o2pls's People

Stargazers

 avatar

Watchers

 avatar

Forkers

mimomics petreius

o2pls's Issues

crossval_o2m_adjR2 error

Here are still some problems. When I use the function crossval_o2m_adjR2 or crossval_o2m, it reports as shown below

crossval_o2m(rna_e,pro_e, a = 1:2, ax = 1:2, ay = 1:2, nr_folds=2)
1: In (function (X, Y, n, nx, ny, stripped = FALSE, p_thresh = 3000,  :
  n + max(nx, ny) = 3 equals sample size
2: In (function (X, Y, n, nx, ny, stripped = FALSE, p_thresh = 3000,  :
  n + max(nx, ny) = 3 equals sample size
3: In loocv_combi(X, Y, e$a, ax[nxny[2]], ay[nxny[1]], app_err = app_err,  :
  Error in (function (X, Y, n, nx, ny, stripped = FALSE, p_thresh = 3000,  : 
  n + max(nx, ny) = 4 exceed sample size N = 3

4: In loocv_combi(X, Y, e$a, ax[nxny[2]], ay[nxny[1]], app_err = app_err,  :
  Error in (function (X, Y, n, nx, ny, stripped = FALSE, p_thresh = 3000,  : 
  n + max(nx, ny) = 4 exceed sample size N = 3

So I check the source code of o2m, I found that

if(nrow(X) < n + max(nx, ny)) 
    stop("n + max(nx, ny) = ", n + max(nx, ny), " exceed sample size N = ",nrow(X))
  if(nrow(X) == n + max(nx, ny)) 
    warning("n + max(nx, ny) = ", n + max(nx, ny)," equals sample size")

you know my matrix was 6 rows(rna,pro), I use the params in cross_o2m_adjR2 is a=1:2,ax=1:2,ay=1:2, so the max value n+max(nx,ny) was 4, it could not exceed the sample size. If I use o2m function only as shown below

fit<-o2m(rna_e,pro_e,2,2,2)

it works well. So I think there is something wrong in the cross* function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.