BUMPS(1)

πŸ’– BUMPS(1) β€” the python-bumps era πŸ’–

okay bestie, sit down, hydrate, because today we're learning about bumps from the python-bumps man page family 🫢 (bumps3 is the same vibe but for python3, noted).


✨ NAME ✨

bumps β€” data fitting and Bayesian uncertainty modeling for inverse problems. yes that's a whole mouthful, but it's iconic, we move πŸ’…


✨ SYNOPSIS ✨

bumps [options] modelfile [modelargs]

bumps [{-? | -h | --help}]

🌸 DESCRIPTION 🌸

This manual page documents briefly the bumps command (and bumps3 for python3, in case you were wondering).

This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has documentation in HTML and in the GNU info(1) format; see below πŸ‘€

So, what is bumps? It provides a set of routines for curve fitting and uncertainty analysis from a Bayesian perspective. And like β€” not just "find me a minimum and call it a day" energy. In addition to traditional optimizers which search for the best minimum they can find in the search space, bumps provides uncertainty analysis which explores all viable minima and finds confidence intervals on the parameters based on uncertainty in the measured values. Bumps has been used for systems of up to 100 parameters with tight constraints on the parameters. Full uncertainty analysis requires hundreds of thousands of function evaluations, which is only feasible for cheap functions, systems with many processors, or lots of patience. (ngl bestie, "lots of patience" is doing a LOT of heavy lifting in that sentence 😭)

Bumps includes several traditional local optimizers such as Nelder-Mead simplex, BFGS and differential evolution. Bumps uncertainty analysis uses Markov chain Monte Carlo to explore the parameter space. Although it was created for curve fitting problems, Bumps can explore any probability density function, such as those defined by PyMC. In particular, the bumps uncertainty analysis works well with correlated parameters. obsessed actually ✨

The modelfile is a Python script (i.e., a series of Python commands) which sets up the data, the models, and the fittable parameters. The model arguments are available in the modelfile as sys.argv[1:]. Model arguments may not start with '-'. periodt.


πŸŽ€ OPTIONS πŸŽ€

The program follows the usual GNU command line syntax, with long options starting with two dashes (`-`). A summary of options is included below. For a complete description, see the HTML documentation or info(1) files. okay here's the full list, no skipping, we're doing ALL of them πŸ’ͺ

  • --preview β€” display the model but do NOT perform a fitting operation. just a lil look, no commitment bestie
  • --pars=filename β€” initial parameter values; fit results are saved as modelname.par
  • --plot=log [linear|log|residuals] β€” the type of plot to display
  • --simulate β€” simulate a dataset using the initial problem parameters
  • --simrandom β€” simulate a dataset using random problem parameters
  • --shake β€” set random parameters before fitting
  • --noise=5% β€” percent noise to add to the simulated data
  • --seed=integer β€” random number seed
  • --err β€” show uncertainty estimate from curvature at the minimum
  • --cov β€” show the covariance matrix for the model when done
  • --entropy β€” compute entropy for the model when done [dream only]
  • --staj β€” output staj file when done
  • --edit β€” start the gui
  • --view=linear|log β€” one of the predefined problem views; reflectometry also has fresnel, logfresnel, q4 and residuals
  • --store=path β€” output directory for plots and models
  • --overwrite β€” if store already exists, replace it
  • --resume=path [dream] β€” resume a fit from previous stored state
  • --parallel β€” run fit using multiprocessing for parallelism
  • --mpi β€” run fit using MPI for parallelism (use command "mpirun -n cpus ...")
  • --batch β€” batch mode; save output in .mon file and don't show plots after fit
  • --noshow β€” semi-batch; send output to console but don't show plots after fit
  • --remote β€” queue fit to run on remote server
  • --notify=user@email β€” remote fit notification
  • --queue=http://reflectometry.org β€” remote job queue
  • --time=inf β€” run for a maximum number of hours
  • --fit=amoeba [amoeba|de|dream|lm|newton|ps|pt|rl|snobfit] β€” fitting engine to use; see manual for details
  • --steps=400 [amoeba|de|dream|lm|newton|ps|pt|rl|snobfit] β€” number of fit iterations after any burn-in time
  • --samples=1e4 [dream] β€” set steps so the target number of samples is drawn
  • --xtol=1e-4 [de, amoeba] β€” minimum population diameter
  • --ftol=1e-4 [de, amoeba] β€” minimum population flatness
  • --pop=10 [dream, de, rl, ps] β€” population size
  • --burn=100 [dream, pt] β€” number of burn-in iterations before accumulating stats
  • --thin=1 [dream] β€” number of fit iterations between steps
  • --nT=25
  • --Tmin=0.1
  • --Tmax=10 [pt] β€” temperatures vector; use a higher maximum temperature and a larger nT if your fit is getting stuck in local minima (we've all been stuck in our local minima era, no shame πŸ₯²)
  • --CR=0.9 [de, rl, pt] β€” crossover ratio for population mixing
  • --starts=1 [newton, rl, amoeba] β€” number of times to run the fit from random starting points.
  • --keep_best β€” when running with multiple starts, restart from a point near the last minimum rather than using a completely random starting point.
  • --init=eps [dream] β€” population initialization method:
    • eps β€” ball around initial parameter set
    • lhs β€” latin hypercube sampling
    • cov β€” normally distributed according to covariance matrix
    • random β€” uniformly distributed within parameter ranges
  • --stepmon β€” show details for each step
  • --resynth=0 β€” run resynthesis error analysis for n generations
  • --time_model β€” run the model --steps times in order to estimate total run time.
  • --profile β€” run the python profiler on the model; use --steps to run multiple models for better statistics
  • --chisq β€” print the model description and chisq value and exit
  • -m, -c, -p command β€” run the python interpreter with bumps on the path:
    • m β€” command is a module such as bumps.cli, run as __main__
    • c β€” command is a python one-line command
    • p β€” command is the name of a python script
  • -i β€” start the interactive interpreter
  • -?, -h, --help β€” display this help

πŸ¦‹ SEE ALSO πŸ¦‹

Bumps is documented fully in HTML at /usr/share/doc/python-bumps-doc/html/index.html[1] and also in the info(1) system. go read it, it's giving ✨thorough✨


πŸ’œ AUTHOR πŸ’œ

Drew Parsons <dparsons@debian.org>

  • Wrote this manpage for the Debian system.

Copyright Β© 2017 Drew Parsons

This manual page was written for the Debian system (and may be used by others).

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.


πŸ“ NOTES πŸ“

  1. /usr/share/doc/python-bumps-doc/html/index.html file:///usr/share/doc/python-bumps-doc/html/index.html

and that's the whole page bestie, no cap, every single flag accounted for πŸ’…

and that's a wrap on bumps β€” this little gem came from the python-bumps man page, dated 10/29/2017, and it lives in the BUMPS(1) section of your friendly neighborhood manual. take care of her, she's doing her best πŸŽ€πŸ’–

πŸ“¦ where this page comes from