My Strategy for Personal Backups
A sane backup strategy is guided by the data recovery needs and the appropriate threat model. Executing it must be effortless, or else it won't be followed through.
As with every technical system, the backup system must be validated by testing - a backup is worthless unless the lost data can be restored from it. Unfortunately, this is easier said than done. To minimize the residual risk, good rules of thumb suggest to be conservative, to follow a simple strategy that is well understood, and to use software that is in wide use and that has a proven track record.
This post is an attempt to reflect my strategy for personal backups - to find bugs and opportunities for improvement. It is tailored to backing up an Apple laptop with an SSD running OS X 10.9, which sees daily use at home, at work and on the commute ride in between.
Non-Negative Sparse PCA Comparison
Version 0.4 of the nsprcomp package brings several improvements:
- The various deflation methods have been replaced with generalized deflation (Mackey, 2009), which directly optimizes the additional variance explained by each component. Implementing generalized deflation required changes to the inner EM loop, and I was unsure at first whether they could be made efficient for high dimensional data. Fortunately, there is only a small constant increase in computational complexity.
nscumcomp
includes a variational re-normalization step (i.e. recomputing the loadings given the support of the pseudo-rotation matrix), which improves the explained variance quite a bit.- Both
nsprcomp
andnscumcomp
return the additional explained standard deviation of each component. This is identical to standard PCA for an orthogonal rotation matrix, but avoids double counting of explained variance for principal axes which are not pairwise orthogonal. See theasdev
function documentation for details.
A comparison on the marty
data from the
EMA package illustrates the
relative performance of sparse PCA methods with R
implementations. This data matrix contains expression profiles for
genes, and thus explores the case. The three
methods considered are nsprcomp
and nscumcomp
and arrayspc
from
the elasticnet package
(version 1.1). PCAgrid
from the
pcaPP package has problems
with long vectors in version 1.9-49 under R 3.0.1 and therefore could
not be included in this comparison.
nsprcomp is on CRAN
When we published our 2008 ICML paper on sparse and non-negative PCA, I thought it might be worthwhile to provide a Matlab implementation of our algorithm as well. Since then, I've received several requests and questions about the code. While the core functionality is there, the implementation lacks a friendly interface and some additional functionality, such as easy random restarts.
After two recent inquiries about using constrained PCA for portfolio optimization and combustion modeling, I decided to fill the gaps in the implementation. Because R has become my primary programming language, this provided an opportunity to learn about package writing and documentation for a public audience, with the goal of submitting the result to CRAN.
Evoluent Upright Mouse 4
I sometimes get funny feelings in my wrists. Shopping for hardware recently, I found the Evoluent Upright Mouse 4. Its fundamental idea is intriguing: holding the mouse with the wrist in a vertical position provides a welcome change from resting the hand horizontally on the keyboard. Evoluent argues that the position is less tiresome because it avoids twisting the radius and ulna bones. I don't know about the medical significance of this claim, but at least it sounds plausible.
I bought the mouse. Unpacking and plugging it in revealed two issues:
- It doesn't look good
- There is a glaring blue LED on the back of the mouse
On the first issue, one can argue that form follows function, even though it should be possible to design a mouse that is pleasing to the wrist and to the eye (Apple gets it wrong the other way). However, the second issue is more serious. For a product that has ergonomy at its center, the blue logo LED is a fail.
I could have taped the logo over, but the mouse is ugly already, so I decided to open the case and disable the LED. If you want to do the same, here are the details to do it with minimal damage (although I suppose that I did void my warranty).