Search Results: "warwick"

24 March 2012

Dirk Eddelbuettel: Initial release 0.1.0 of package RcppSMC

Hm, I realized that I announced this on Google+ (via Rcpp) as well as on Twitter, on the r-packages list, wrote a new and simple web page for it, but had not put it on my blog. So here is some catching up. Sequential Monte Carlo / Particle Filter is a (to quote the Wikipedia page I just linked to) sophisticated model estimation technique based on simulation. They are related to both Kalman Filters, and Markov Chain Monte Carlo methods. Adam Johansen has a rather nice set of C++ classes documentated in his 2009 paper in the Journal of Statistical Software (JSS). I started to play with these classes and realized that, once again, this would make perfect sense in an R extension built with the Rcpp package by Romain and myself (and in JSS too). So I put a first prototype onto R-Forge and emailed Adam who, to my pleasant surprise, was quite interested. And a couple of emails, and commits later, we are happy to present a very first release 0.1.0. I wrote a few words on a RcppSMC page on my website where you can find a few more details. But in short, we already have example functions demonstrating the backend classes by reproducing examples from
Johansen (2009)
and his example 5.1 via pfLineartBS() for a linear bootstrap example;
Doucet, Briers and Senecal (2006)
and their (optimal) block-sampling particle filter for a linear Gaussian model (serving as an illustration as the setup does of course have an analytical solution) via the function blockpfGaussianOpt()
Gordon, Salmond and Smith (1993)
and their ubiqitous nonlinear state space model via the function pfNonlinBS().
And to illustrate just why Rcpp is so cool for this, here is a little animation of a callback from the C++ code when doing the filtering on Adam's example 5.1. By passing a simple plotting function, written in R, to the C++ code, we can get a plot updated on every iteration. Here I cheated a little and used our old plot function with fixed ranges, the package now uses a more general function: Example of RcppSMC callback to R plot when estimation example 5.1 from Johansen (2009) The animation is of course due to ImageMagick glueing one hundred files into a single animated gif. More information about RcppSMC is on its page, and we intend to add more examples and extensions over time.

18 December 2010

Dirk Eddelbuettel: Introduction to ESS: talk and slides

We had another meeting of the Chicago R User Group last evening. This was scheduled somewhat belatedly once we learned that Drew Conway would be in town. Drew gave a very nice talk about his brand new infochimps package (for accessing the eponymous infochimps data service and marketplace). Slides are available on Drew's blog. In fact, he had already blogged about his talk before I had even started to write my slides... The user group meetings have a meme of showing how to use R with different editors, UIs, IDEs,... It started with a presentation on Eclipse and its StatET plugin. So a while ago I had offered to present on ESS, the wonderful Emacs mode for R (and as well as SAS, Stata, BUGS, JAGS, ...). And now I owe a big thanks to the ESS Core team for keeping all their documentation, talks, papers etc in their SVN archive, and particularly to Stephen Eglen for putting the source code to Tony Rossini's tutorial from useR! 2006 in Vienna there. This allowed me to quickly whip up a few slides though a good part of the presentation did involve a live demo missing from the slides. Again, big thanks to Tony for the old slides and to Stephen for making them accessible when I mentioned the idea of this talk a while back -- it allowed to put this together on short notice. And for those going to useR! 2011 in Warwick next summer, Stephen will present a full three-hour ESS tutorial which will cover ESS in much more detail.

28 September 2010

Gerfried Fuchs: That's What Friends Are For

If I'll make it through this week it's because of these special people in my life. They help me through thick and thin, they believe in me, they are there for me. There is one universal term for them, friends. The term in its real meaning, in its original meaning, not in the perverted sense that sites like Facebook want to make you believe that it's alright to apply to random bystanders. You won't go as far for those as you'd go for your true friends, so don't let them steal away the meaning of the word from you. As music is one of the most driving force for me and this song makes me wanna cry, this is what I want to send out to my friends who are able to motivate me to keep me going: That's What Friends Are For. And as this song is so special I won't drown it in two more like I usual do, this blog entry goes to my personal section anyway. There is though a second video of a live version of it that in my opinion adds quite something to it, it contains a short interview with Dionne Warwick at the end. Enjoy!

/personal permanent link Comments: 2 Flattr this

20 February 2008

Vincent Fourmond: pdfnup and page size

I use a combination of pdftk and pdfnup, from the pdfjam package to arrange (PDF) graphs produced by ctioga into an array for printing. However, I find that a simple
pdfnup --nup 3x3 concatenated_graphs.pdf
does not produce an A4 output (even with --paper a4paper), but a PDF who has the same size as individual graphs. Painful. It did take me long to realize it is a feature of pdfnup, who asks pdfTeX to have the paper size adjusted to that of the input when the layout is symmetric and no orientation has been provided. To disable that, and get a real A4 paper, specify the orientation:
pdfnup --orient portrait --nup 3x3 concatenated_graphs.pdf

2 December 2007

Chris Lamb: Custom Debian-Installer images for DCS

It can be a little awkward installing Debian in my Department’s labs. After obtaining a DHCP lease, you cannot establish any useful connection without first authenticating against a HTTP Basic page. However, as this page uses SSL and D-I’s Wget is not linked against any SSL libraries, you are a little stuck. To solve this (and to avoid resorting to ugly hacks), I created a udeb that prompts the user for their username and password (see screenshots above) and then authenticates using a statically-linked build of Curl. It seems to be fairly robust, and only bloats the ISO by about 200KB. I’ve also preseeded a number of options suitable for DCS, such as using the local mirror and assuming UK locales and keyboard, etc. My modifications are available, along with some documentation on how to recreate my images. I have also uploaded a few images to our mirror. D-I hacking turns out to be quite fun and relatively painless, but I’m now stuck for a useful project to use it again, and I probably don’t know enough yet to tackle some of its Lenny goals either. Any ideas? Oh, if some d-i guru can explain how I can force the display of the “Choose suite” question without patching choose-mirror, that would also be excellent.

31 October 2007

Chris Lamb: Essential course texts for sale. Never used .

9 October 2007

Chris Lamb: Optimal solution for the block stacking problem found

I attended an interesting seminar on the block stacking problem today given by Professor Mike Paterson of the University of Warwick. Like all good problems, it can be stated simply: how far can a stack of n identical blocks be made to hang over the edge of a table? The answer was widely believed to be of order log n (like the white shaded example above), but Mike Paterson and Uri Zwick previously constructed overhangs of order n^ 1/3 . In the seminar today, Paterson and his co-authors presented their proof that order n^ 1/3 is indeed the upper bound possible, resolving a long-standing mathematical problem. Professor Paterson is an excellent orator, highly recommended.

2 October 2007

Chris Lamb: Renaming a Mailman list

This evening I renamed a number of UWCS’s mailing lists for a few reasons, mostly due to the annoying ambiguity of the old names. Mailman doesn’t make this particularly easy - this how you can do it under Etch;
  1. First, define variables to avoid stupid mistakes:
    $ OLD=old-list-name
    $ NEW=new-list-name
    $ set -u
  2. Next, take down Mailman and do a quick sanity check. The MTA should queue any incoming mails when qrunner stops responding.
    $ sudo /etc/init.d/mailman
    $ sudo sh -c "[[ -a /var/lib/mailman/archives/private/$ NEW  ]] && echo '*** That mailing list name already exists. *** '"
  3. Now move the list data and regenerate the archives for that list:
    $ sudo mv /var/lib/mailman/lists/$ OLD  /var/lib/mailman/lists/$ NEW 
    $ sudo mv /var/lib/mailman/archives/private/$ OLD  /var/lib/mailman/archives/private/$ NEW 
    $ sudo mv /var/lib/mailman/archives/private/$ OLD .mbox /var/lib/mailman/archives/private/$ NEW .mbox
    $ sudo mv /var/lib/mailman/archives/private/$ NEW .mbox/$ OLD .mbox /var/lib/mailman/archives/private/$ NEW .mbox/$ NEW .mbox
    $ sudo /var/lib/mailman/bin/arch $ NEW 
  4. You should probably provide legacy aliases:
    $ cp /etc/aliases  mktemp aliases-backup.XXXX 
    $ printf "\n# '$ OLD ' -> '$ NEW ' mailing list rename \n"   sudo tee --append /etc/aliases
    $ echo "$ OLD : $ NEW "   sudo tee --append /etc/aliases
    $ for SUFFIX in admin bounces confirm join leave owner request subscribe unsubscribe; do echo "$ OLD -$ SUFFIX : $ NEW -$ SUFFIX "   sudo tee --append /etc/aliases; done
  5. Now go to the administrator interface and change:
    • General / real_name: NEW
    • General / subject_prefix: “[NEW] ” (or similar)
    • Privacy / Recipient filters / acceptable_aliases: Add OLD
  6. Now, bring everything back online with:
    $ sudo newaliases
    $ sudo /var/lib/mailman/bin/genaliases
    $ sudo /etc/init.d/mailman start
  7. For bonus points, generate yourself Apache redirect for the new name:
    $ echo "RewriteRule ^/([^/]*)/$ OLD ($ (/.*)) /$1/$ NEW $2$3 [R=301,L]"
Ta-da, nice new names. You will need to warn your users as their filtering will have now broken.

6 August 2007

MJ Ray: Movements and the recent silence

I've been offline, but I think I've caught up now. Email if you think I missed you. Here's some of what I did before I went offline:
robmyers Seller's Remorse
Social Contract ten years on July 5 -- celebration?
Advertising Free Software Projects etbe
A Cambridge Co-operator: Great News
Cooperative? My Arse Web design and development techniques by Steve Tucker
Anti-DRM campaign, Apple Store, London.
Place Your Blog on a 'Busy Intersection'
Should Links from Your Blog Open in a New Window? Reader Opinions
Co-opNet :: View topic - What Crisis
LWN: Totally "free" Ubuntu? That's the plan for Gobuntu (
The Problem with RSS
Property of a Lady Answers to Love Is Strange Trivia
Fairtrade Beer niq's soapbox
Co-opNet :: View topic - The Cooperative Tour de France
ITV response to Coverage Question... - Page 3 - ITV Message Boards
Why doesn't Online Main Stream Media link?
Property of a Lady Tuesday Trivia: Dance
Humor for Bond 22? Ultimate James Bond Fan Blog
lamby :: blog :: Graduation
itv and Other Tours Coverage: Vuelta, ToB
Reflowd - Recentlog
Reflowd - Source code
Aaargh! niq's soapbox

26 May 2007

Chris Lamb: Pro Prolog is pro.

A lot of computer problems (and some puzzles) simply involve backtracking over the solution space and checking constraints, yet these can be fairly clunky to describe in imperative languages. Compounding this, the high cost of method calls in most VM and dynamic languages make any reasonably sane-looking implementation (read: recursive) rather slow. A much better idea is to use a language that makes this really easy, like Prolog: I have a Compiler Design exam in less than a weeks time, and a common question involves being given a number of definitions of compilers in terms of their source and target languages, along with the language the compiler itself is implemented in. The task is simply to work out whether it is possible to translate from a specified language to another. This is just two stanzas in Prolog:
can_translate(Src, Tgt, [L])   :- t_diagram(Src, Tgt, _, L).
can_translate(Src, Tgt, [H T]) :- t_diagram(Src, Via, _, H),
   can_translate(Via, Tgt, T).
Compilers can be then just be defined with
t_diagram(source, target, implemented in, name).
and querying the translation pipeline is done with
?- can_translate(source, target, Result)
(Modifying it so that it works with cycles isn’t very tricky, either.)

16 May 2007

Chris Lamb: A confession

Yes, it’s true:

3 May 2007

Chris Lamb: Final report complete!

Just submitted my third-year project. Was probably the longest document I will ever write:
$ wc -w  find ~/local/bzr/3yp/docs/report -name "*.tex"    tail -n1
19234 total
(If new readers are picking up the story late, in the final year of the Warwick Computer Science course, students are required to undertake a reasonably sized project. I chose to write a Java compiler in Python.) Actually writing the report was a bit more painful than I thought, dispite having collected and organised most of the data, references and interesting topics well in advance. I’ve nearly overcome some sort of writers-block-cum-nervousness issue though, which is good. I got a few interesting results: My backend system had a peephole optimiser to run on all code regardless of the input language and it seems like Sun’s javac seems to miss out on many really trivial optimisations, probably because the JIT takes care of any performance blackspots. Regardless, I plan to have a go at adding this into OpenJDK after my exams just as an excuse to hack on the Real Java. (I also did some register allocation, also beating javac, althought I didn’t really investigate way) I’ll have to wait for while due to University regulations anyway, but I’m not sure if the project code is really fit for public consumption yet, but I plan to rip out the silly Lisp implementation (and most of the Java one) leaving a rather fast and “enterprise-ready” Brainf*** compiler. :)

25 April 2007

Chris Lamb: Hi, Planet Debian.

In the upcoming holidays I’ll be working with Daniel Baumann on a graphical user interface to Debian Live thanks to the Google Summer of Code (I posted my full proposal to debian-live-devel if you want to read more). Thanks to Daniel for agreeing to be my mentor. This is my first post to Planet Debian, by the way. A few people might have met me at certain events, but if you haven’t I’m a kinda average hacker-type with a short attention span, long hair, broken sleeping patterns and above-average caffeine requirements. I’m currently a student at the University of Warwick and first started using Debian with “Slink”. If I’m missing anything, or you just want to say hi, please post a comment.

18 September 2006

Uwe Hermann: Manipulating PDFs from the command line - joining, merging, rotating [Update]

One of the single most useful packages when it comes to PDFs in Linux is pdfjam. From the website: The installation is easy as always: apt-get install pdfjam PDF is not exactly the most easily editable format out there, but these tools can save you lots of time and trouble. Just recently I needed to merge two PDFs into one (and I didn't have any source format of the files). A simple pdfjoin foo1.pdf foo2.pdf --outfile bar.pdf does the job in a few seconds. Equally useful when you need to print huge documents is pdfnup --nup 2x2 foo.pdf, which sticks four PDF pages into one (thus drastically reducing the amount of pages you have to print)... Update 2006-09-20: As was noted by several people, pdftk is very cool, too. It can do some other things such as split PDFs, encrypt/decrypt them, manipulate metadata and more...

31 July 2006

Andres Salomon: my new baby

I bought a new bass today, it sounds incredible. A close-up picture, and the the entire thing. It’s a Warwick Corvette (fretless).