Coder Social home page Coder Social logo

Comments (3)

piotrp88 avatar piotrp88 commented on August 17, 2024

I compared survival versus rms 4.4-2 as the first batch. Than I compared survival against rms 4.4-2 after implementing the above suggestions as the second batch. I repeated the same test using a 200MB dataset.

Using the 64MB dataset, the modified rms library performed ~18.15% better than the original one and using the 200MB dataset it performed even better, ~20.60%.

These are the results of my tests (timings are averaged per each batch; there are 3 runs per batch and 2 batches per dataset, 24 total runs):

# ---------- 64MB dataset (3 runs per batch) -----------
# survival VS rms 4.4.2
survival: 44.583333
rms: 39.735333
Speed gain: 10.87%

# survival VS rms 4.4-2 (using suggested edits)
survival: 43.524000
rms: 32.525000
Speed gain: 25.27%



# ---------- 200MB dataset (3 runs per batch) -----------
# survival VS rms 4.4-2
survival: 172.125667
rms: 155.115000
Speed gain: 9.88%

# survival VS rms 4.4-2 (using suggested edits)
survival: 171.674667
rms: 123.157000
Speed gain: 28.26%

As dataset size increases, performance gain increases too.

from rms.

harrelfe avatar harrelfe commented on August 17, 2024

On the first item, I don't quite agree that not storing the lp should imply that certain summary statistics should not be computed.

On the second suggestion I'd like to know the time overhead of names(large vector) <- NULL

Frank

from rms.

piotrp88 avatar piotrp88 commented on August 17, 2024

For the first item it would probably be useful to add an argument to cph() like one of the followings:

  • cph(..., compute.gini=T, compute.dxy=T)
  • a list of discrimination indexes to be computed which defaults to all possible values: cph(..., discr.indexes=c("R2", "Dxy", "g", "gr")) so if one specifies cph(..., discr.indexes=NULL) then no discrimination indexes will be computed while cph(..., discr.indexes=c("R2")) only computes R2 index.

More generally it would be better to let the user have control over which computations have to be done when performance matters, especially for computations which involve vectors or matrixes of n rows.

For the second suggestion the time overhead of names(large vector) <- NULL on my machine is cetrainly trascurable:

> huge.vector <- rnorm(100000000, 1, 2)
> system.time(names(huge.vector) <- NULL)
   user  system elapsed 
  0.170   0.237   0.407 

but I'm running MRO. You should try using a standard R version.

from rms.

Related Issues (20)

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.