Great site about using variational methods. Although aimed at Mechanics, the introduction, and explanation of the notation is done well and suitable to beginners studying about variational methods.

# Spell checking in Vim

Taken from here:

## We can switch on spell checking with this command:

`:setlocal spell `

We can also specify the language:

`:setlocal spell spelllang=en_us`

By turning on spell-checking in our `~/.vimrc`, we’ll be turning on word completion as well. The following command will let us press `CTRL-N` or `CTRL-P` in insert-mode to complete the word we’re typing!
`set complete+=kspell`

## Add words to the dictionary

We can add words like “RSpec” or “thoughtbot” to the `spellfile` (just a list of correctly-spelled words, not a list of magical incantations) by cursoring over those words in a file and typing:
`zg`

That’s all for now. Visit the link above for more thoughts.

# MCMC: Hamiltonian Monte Carlo (a.k.a. Hybrid Monte Carlo)

Aesome blog post! Want to use HMC in my research

The random-walk behavior of many Markov Chain Monte Carlo (MCMC) algorithms makes Markov chain convergence to a target stationary distribution \$latex p(x)&s=-1\$ inefficient, resulting in slow mixing. Hamiltonian/Hybrid Monte Carlo (HMC), is a MCMC method that adopts physical system dynamics rather than a probability distribution to propose future states in the Markov chain. This allows the Markov chain to explore the target distribution much more efficiently, resulting in faster convergence. Here we introduce basic analytic and numerical concepts for simulation of Hamiltonian dynamics. We then show how Hamiltonian dynamics can be used as the Markov chain proposal function for an MCMC sampling algorithm (HMC).

## First off, a brief physics lesson in Hamiltonian dynamics

Before we can develop Hamiltonian Monte Carlo, we need to become familiar with the concept of Hamiltonian dynamics. Hamiltonian dynamics is one way that physicists describe how objects move throughout a system. Hamiltonian dynamics describe an object’s…

View original post 2,621 more words

# Hamiltonian Dynamics for MCMC

Test latex code:

$p(\Delta t)=m(\Delta v)= \dfrac{m \Delta x}{\Delta t}$

# Scripting and Bash

Every once in a while I need to do some Bash scripting. Especially when grading students, but sometimes for other purposes. The answer to how to do stuff in bash is a Google search away. However, there are some websites with great pointers on what to do, and what not to do in Bash:

mywiki.wooledge.org/BashPitfalls

# How to format Scientific Posters?

Did you ever wonder what is great conference poster format?

This website gives exact pointers:

• Select a font size that is readable from at least 3 ft. (e.g., title: 60 pts, body and headings: 30 pts, text: no smaller than 18 pts).
• Select a sans-serif font (e.g., Helvetica, Arial) for titles and headings. Use graphics instead of text when feasible, and avoid large blocks of text.
• When creating a new document, set the document dimensions and the poster orientation (portrait or landscape). For some programs such as PowerPoint you use the page setup panel to set document dimensions and orientation.
• Using PowerPoint
• Setting dimensions and orientation is done in the “Page Setup…” panel.
• Select File > Page Setup…
• For both portrait and landscape orientation, set Width: 30 and Height: 40.
• Select the Orientation value. (This may switch the values you typed for width and height.)
• Design the slide by adding text and graphical elements. The final objective is to produce an Adobe PDF file representing the 30″ x 40″ poster. This is simpler on a Macintosh than on a Windows system.
• The Adobe PDF file is produced by “printing to a file” using the HP DesignJet 5500 print driver and page size 30″ x 40″. On the Mac, choose “Save as PDF”. On Windows, check “Print to File”, and then use Adobe Distiller to make a PDF from the Postscript file.
• On a Windows
• Select File > Print…
• Select the Printer Name: HP DesignJet 5500.
• Select the Properties button.
• Select the same Orientation value chosen above.
• Select 30″ x 40″ for the Paper Output: Paper Size value.
• Select the OK button and then the second OK button.
• Check the “Print to File” option and select the OK button.
• Type the output filename (e.g., “poster.ps”). Be sure to type the .ps extension and the quotation marks.
• Select “Save” to generate the PostScript output file.
• Upload the poster.ps file to the central UNIX system named Strauss.
• Use the Adobe distiller program to convert the PostScript file to PDF format.
• Type “distill poster.ps” to create “poster.pdf”.
• On a Mac OS
• The Page Size is set to 30″ x 40″ in the Page setup before printing.
• Select File > Print…
• Select the Printer: HP5500_DJRIP…
• Select the “Save as PDF” button.
• The output filename will be “poster.pdf”.
• Modify an existing poster
• First, create a new document to 30″ x 40″ as described above. Then, copy and paste the contents of the old poster into the a new one. You may need to choose different font sizes.
Special case: A 16-slide PowerPoint presentation
• A PowerPoint presentation of 16 slides can easily become a poster with no modifications to original file. The 16 slides will be displayed as a 4 x 4 grid. Since the default size of each PowerPoint slide is 10″ x 7.5″, this makes a 40″ x 30″ poster