Git Product home page Git Product logo

Comments (3)

helske avatar helske commented on September 27, 2024

In theory, you could get some asymptotic standard error estimates from the Hessian used in the numerical optimization (local_step = TRUE). However, this is at least currently not supported and would need some work as the nloptr used for the numerical optimization does not return the Hessian. Of course, "manually" estimating the model with optim and logLik functions with hessian=TRUE is possible.

If you have a reasonable amount of sequences, you could compute nonparametric bootstrap estimates though.

from seqhmm.

tbeason avatar tbeason commented on September 27, 2024

I do have a lot of sequences. In the lowest case, around 50,000. In the largest case, around 1 million. How would I go about doing the bootstrap? I am familiar with bootstrap methods in general, but this is my first trip into HMM methods so I am open to suggestions. My first thought would be to randomly select entire sequences (with replacement), so that the original sequence remains intact but the sample composition becomes random.

Sidenote: The parallelization works well! Estimation is not too slow even with a large number of sequences when using 64 cores. Thanks for that!

from seqhmm.

helske avatar helske commented on September 27, 2024

Yes, your strategy of sampling randomly entire sequences sounds right. In order to avoid potential issues with multiple (local) optima (as well as in order to speed the bootstrap), I suggest you use the estimated parameters as initial values in the bootstrap loop, i.e. you have your estimated model based on the original data, say mod, and then you define boot_model <- build_hmm(boot_sequences, transition_probs = mod$transition_probs, emission_probs = mod$emission_probs, initial_probs = mod$initial_probs).

from seqhmm.

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.