Giter VIP home page Giter VIP logo

model-selection's Introduction

model-selection's People

Contributors

4ment avatar rbouckaert avatar simongreenhill avatar walterxie avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

model-selection's Issues

PathSampleAnalyser with 14 steps and -alpha 0 fails

With alpha=0, uniform steps are taken, and with 14 steps step1 runs into trouble (see error message below). It looks like there is some numeric instability, which is not encountered with alpha=0.3 (the default).

Fatal exception: Cumulative probability function returned NaN for argument 0.923 p = 0.923
org.apache.commons.math.FunctionEvaluationException: Cumulative probability function returned NaN for argument 0.923 p = 0.923
at org.apache.commons.math.distribution.AbstractContinuousDistribution$1.value(Unknown Source)
at org.apache.commons.math.analysis.solvers.BrentSolver.solve(Unknown Source)
at org.apache.commons.math.analysis.solvers.BrentSolver.solve(Unknown Source)
at org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.solve(Unknown Source)
at org.apache.commons.math.distribution.AbstractContinuousDistribution.inverseCumulativeProbability(Unknown Source)
at org.apache.commons.math.distribution.BetaDistributionImpl.inverseCumulativeProbability(Unknown Source)
at beast.inference.PathSampleAnalyser.estimateMarginalLikelihood(Unknown Source)
at beast.inference.PathSampler.analyse(Unknown Source)
at beast.inference.PathSampler.doRuns(Unknown Source)
at beast.inference.PathSampler.run(Unknown Source)
at beast.app.BeastMCMC.run(Unknown Source)
at beast.app.beastapp.BeastMain.(Unknown Source)
at beast.app.beastapp.BeastMain.main(Unknown Source)
Fatal exception: Cumulative probability function returned NaN for argument 0.923 p = 0.923
java.lang.RuntimeException: An error was encounted. Terminating BEAST
at beast.app.util.ErrorLogHandler.publish(Unknown Source)
at java.util.logging.Logger.log(Logger.java:738)
at java.util.logging.Logger.doLog(Logger.java:765)
at java.util.logging.Logger.log(Logger.java:788)
at java.util.logging.Logger.severe(Logger.java:1464)
at beast.app.beastapp.BeastMain.(Unknown Source)
at beast.app.beastapp.BeastMain.main(Unknown Source)

add correct citations

The current @Citation is automatically inherited. If beast.gss.GeneralisedSteppingStoneStep, beast.inference.PairedPathSamplingStep, beast.inference.PathSamplingStep do not have citations, then they will use BEAST 2 paper as the citation because they are inherited from MCMC.

Rename PathSampler to SteppingStoneSampler

It confuses users that want to do a stepping stone analysis, but calculate scores using the PathSampleAnalyser. Even though by default it is a stepping stone analysis that is being done.

Using the beast 2.6 path sampler xml on beast 2.7 gives unhelpful error messages that are hard to debug

Regarding the BFD* tutorial for beast 2.6 which suggests you add this block of code to the xml:

<run spec=‘beast.inference.PathSampler’
chainLength="1000"
alpha=‘0.3’
rootdir=‘/home/desktop/BFD*-tutorial/runA/’
burnInPercentage=‘0’
preBurnin="0"
deleteOldLogs=‘true’
nrOfSteps=‘24’>
cd $(dir)
java -cp $(java.class.path) beast.app.beastapp.BeastMain $(resume/overwrite) -java -seed $(seed) beast.xml

If you fail to correct beast.inference.PathSampler to modelselection.inference.PathSampler (which I just did and I suspect most users will also do), then it would make sense to see an error which reads "cannot find beast.inference.PathSampler, did you mean modelselection.inference.PathSampler?"

However, instead of this I got the error message:

java.io.FileNotFoundException: /home/desktop/BFD*-tutorial/runA/step0/mcmc.xml (No such file or directory)

which made the problem much more difficult to debug.

I just wonder if there is a way of making this issue easier for futrue users to fix when they inevitably encounter it

Would be nice if run0.{sh,bat} could use variables.

e.g. instead of multiple lines of this:

cp /tmp/analysis/step0/beast.xml.state /tmp/analysis/step1
cd "/tmp/analysis/step1"
java -cp "/Applications/Phylogenetics/BEAST 2.4.0/BEAUti.app/Contents/Java/Classes:/Applications/Phylogenetics/BEAST 2.4.0/BEAUti.app/Contents/Java/launcher.jar:/Users/simon/Library/Application Support/BEAST/2.4/BEAST/lib/beast.jar:/Users/simon/Library/Application Support/BEAST/2.4/BEAST/lib/beast.src.jar:/Applications/Phylogenetics/BEAST 2.4.0/lib/beast.src.jar:/Users/simon/Library/Application Support/BEAST/2.4/Babel/lib/Babel.addon.jar:/Users/simon/Library/Application Support/BEAST/2.4/Babel/lib/itextpdf-5.5.9.jar:/Users/simon/Library/Application Support/BEAST/2.4/BDSKY/lib/BDSSM.addon.jar:/Users/simon/Library/Application Support/BEAST/2.4/BEAST_CLASSIC/lib/BEAST_CLASSIC.addon.jar:/Users/simon/Library/Application Support/BEAST/2.4/BEAST_CLASSIC/lib/mtj.jar:/Users/simon/Library/Application Support/BEAST/2.4/BEASTLabs/lib/BEASTlabs.addon.jar:/Users/simon/Library/Application Support/BEAST/2.4/MODEL_SELECTION/lib/MODEL_SELECTION.addon.jar:/Users/simon/Library/Application Support/BEAST/2.4/morph-models/lib/MM.addon.jar:/Users/simon/Library/Application Support/BEAST/2.4/subst-bma/lib/SubstBMA.addon.jar:/Applications/Phylogenetics/BEAST 2.4.0/lib/beast.src.jar:/Users/simon/Library/Application Support/BEAST/2.4/BEAST/lib/beast.src.jar" beast.app.beastapp.BeastMain -resume -java -seed 815032149 beast.xml

could become:

SEED=815032149
CWD="/tmp/analysis/"
CLASSPATH="/Applications/Phylogenetics/BEAST ....etc"

cp $(CWD)step0/beast.xml.state $(CWD)step1
cd "$(CWD)step1"
java -cp $(CLASSPATH) beast.app.beastapp.BeastMain -resume -java -seed $(SEED) beast.xml

...which would then make the subsequent analysis scripts easier to move between machines (say from laptop to a cluster, where e.g. CWD and CLASSPATH is different).

Not sure how .bat files handle variables though, so this might be tricky to get working cross-platform.

Even better would be a loop, as then you could just increment $MAX_STEPS and rerun, but again cross-platform compatibility could be nightmare (e.g. from memory for loop syntax isn't consistent even across POSIX).

nullCannot instantiate class. Please check the spec attribute.

I get the following error when trying to run the PathSampling app:

beast.util.XMLParserException:
Error 1006 parsing the xml input file

nullCannot instantiate class. Please check the spec attribute.

Error detected about here:
  <beast>
      <subtemplate id='HyperPrior'>
          <connect>

    at beast.util.XMLParser.createBeastObject(Unknown Source)
    at beast.util.XMLParser.createObject(Unknown Source)
    at beast.util.XMLParser.parseInputs(Unknown Source)
    at beast.util.XMLParser.createObject(Unknown Source)
    at beast.util.XMLParser.parseFragment(Unknown Source)
    at beast.util.XMLParser.parseBareFragment(Unknown Source)
    at beast.app.beauti.BeautiConfig.initAndValidate(Unknown Source)
    at beast.app.tools.PathSampler.main(Unknown Source)

... this happens if I use the GUI or try to run it via appstore PathSampler.

robustify for empty compound distributions

only posterior(prior,likelihood) is expected, but cladeage can add another CompoundDistribution that (if not used) messes up the pattern by adding posterior(prior,likelihood,fossilcalibrations). If this is empty, the path sampler should not stop for it.

Include complete path to beast.jar

If you start a PS analysis without complete path, the run files do not get absolute paths, and possibly won't start.

To fix this, the java.class.path should be expanded to include absolute paths.

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.