Friday, August 20, 2010

WinBUGS and JAGS differences

One of my graduate students and I have been working on input modeling in a setting where the amount of historical data can range from a lot to almost no (i.e. 0, 1, 2) occurrences. So both of us have been learning Bayesian methods and developing means to work with our setting. Part of this involves working with the standard tools and building blocks for Bayesian methods, in particular Monte Carlo Markov Chains (MCMC). To implement these methods, you can program your own, or use some standard modeling frameworks. Some of these frameworks are essentially programming libraries. But the primary ones are Bayesian inference Using Gibbs Sampling (BUGS) derivatives. There are two families: WinBUGS/OpenBUGS and JAGS.

WinBUGS is the direct successor to BUGS, with OpenBUGS being the open source next generation. BUGS is both a software package as well as a model specification language for MCMC models. One issue with WinBUGS/OpenBUGS is that it is written in Component Pascal. WinBUGS depended on the BlackBox component builder, which is only available in MS Windows (as does OpenBUGS, but OpenBUGS is essentially the open source next generation of WinBUGS once it is done). JAGS is an opensource implementation of the BUGS model specification and command language and is written in C++ on top of some open source libraries. JAGS exists specifically because of the inability to port WinBUGS. A review of the literature shows that WinBUGS/JAGS/various other libraries, all have areas of strength and weakness. Research groups working extensively with Bayesian methods use all of the them at various times.

But, this is our first project. So one thing we did was to examine three frameworks while we were learning Bayesian methods. I primarily used JAGS, one graduate student worked with WinBUGS, a third graduate student (the strongest programmer) used MCMCpack (an R package).

Our intent was to use either WinBUGS or JAGS when we actually implemented our methods on real data, so the question was which to use. Some obvious differences that came up.

  1. When running using R, the RWinBUGS interface opens the WinBUGS application to run BUGS model. We anticipate having to run this on ~50 separate data sets a day as part of our methodologies. This time of interface is unstable (both theoretically, and practically as my student's computer ends up hanging a lot)
  2. WinBUGS is a lot more particular about the BUGS model specification. Or, since the WinBUGS people are the ones who developed the BUGS model specification, it is probably better to say that JAGS is much more forgiving. Some gotchas that came up included:
  • When specifying distributions, parameters in WinBUGS could not be expressions. Only single variables. I.e. something like (num1*num2) is not allowed. So we have to perform all computations, then specify the distribution separately. JAGS allows passing an expression as a parameter.
  • WinBUGS does not have an exponent operator (either '^' or '**') JAGS does. Since one parameter that is important and common is 1/variance, this is very useful when the data is expressed in terms of standard deviation. We have to use expressions like (num1*num1) all over the place.
  • JAGS from R is seamless (R2jags, rjags). You call JAGS, and it returns without opening any IDEs. You can see the JAGS output in the terminal, but JAGS runs in command line, then is done. No IDE left to close. (R2jags was designed to work the same way as RWinBUGS, but I think it is much more elegant)
  • The JAGS documentation includes some more differences, but we have not hit those yet.
So, for this project, given that we have a certain amount of risk based on the fact that we are figuring out Bayesian methods and MCMC along the way, we're going to go with JAGS as our engine. Someday we'll get better at using WinBUGS/OpenBUGS and MCMCpack, but not today.

Thursday, August 05, 2010

Book review: The Visual Display of Quantitative Information by Edward Tufte

Edward R. Tufte: The Visual Display of Quantitative Information by Edward R. Tufte

My rating: 4 of 5 stars


The book goes through many examples of displaying information visually. And it does so through a historical context, reminding us that the issues that are faced and the many ways to (mis)-represent them have been around for centuries.

What I'm reminded of is that statistics and data analysis is not just about methods, but they are means of communication. And like all methods of communication, they can be made less clear whenever you have something other than clear communication as the goal.

Many of the techniques discussed in the creation of various plots and charts are artifacts of when printing graphics was done by ink and pen, and difficult to reproduce. But the book's focus is not on the techniques of making these visual displays, but on the principles in designing efficient displays.

I use a number of data analysis packages and packages, Excel, R, Python, etc. After reading this it makes me look at these other packages and their options differently, wanting to evaluate the choices there designers made. It also makes me look at charts and graphs on internet sites, newspapers and magazines differently. I imagine the author would consider that to be a success.

View all my reviews >>

Friday, July 30, 2010

Five factors that make a job dangerous

From a recent presentation by K. Emmerling to Southwest PA (Pittsburgh) Red Cross Disaster Volunteers on dealing with difficult people
  • You work with the public
  • You work after midnight
  • You handle money
  • You work alone (or are the ranking person present)
  • There are weapons present
The presenter then worked through a quick narrative that explained that in the course of regular duties as Red Cross Disaster Volunteers, all five are present. Those present had numerous examples of social situations that occurred on duty that had potential to escalate.

Stay safe everyone.

Thursday, July 22, 2010

Looking at source code version control: Comments wanted

I've been investigating version control systems for use by a team. Is there anyone who uses these who can have some comments? I'm leaning towards Mercurial, but I am open to change (our best programmer likes Git). What follows are my notes on some version control systems. Note: While I personally like/use Linux, as a team we are being provided with Windows machines for this project. Based on my review, I'm only looking at Subversion, Mercurial and Git. Comments and experience would be helpful.

=====

Version control systems (VCS) are used to track historical changes to source code (text) files as well as a means to enable collaboration between team members working on a single project. Note that this can be for any text based project, both programming or LaTeX writing. There are 2 major advantages:
  1. Rollback: It is possible to retrieve the version of a file at any point in time. This is especially useful when one is exploring a new idea that ends up not working (or has introduced a bug or error into a program/file) (Note: Apple Computing advertises this feature in recent versions of Mac OS X as the "Time Machine", which is essentially version control built into an operating system).
  2. Collaboration: In the case of multiple people working on a different parts of a single project, changes that are made by one person can be committed to a shared repository, then distributed to all other team members. This results in a definitive version of a system, even as multiple team members are involved in ongoing work on their own parts of the system. Is it does so, version control can keep track of the changes, so that if a change is determined to cause problems and needs to be removed, it can be removed for everyone (or only on an individual's local version as needed)

There are two major categories of modern version control system: Centralized and Distributed

Centralized version control requires the use of a server, and all team members can update or branch using the centralized repository. For distributedversion control, all team members have a local version of source code repository, that can be synchronized to a definitive repository as needed. Distributedversion control is a relatively recent development (
  1. Native availability under MS Windows (availability under UNIX/LINUX is true for almost all Version Control systems). Preferably without use of Cygwin or MSYS.
  2. Can be used through GUI - through the operating system file explorer or a stand alone GUI (all open source VCS enable command line use)
  3. Integration with IDE - Visual Studio, Eclipse etc (EMACS/VIM integration can be assumed for open source VCS)
  4. Documentation - Tutorials available for those learning the system with the expectation of infrequent use
  5. Existing support within ___


  6. Evaluation

    For evaluation purposes we will compare three systems Subversion, Git and Mercurial, each of which are open source (license allows for free distribution) and in widespread use including a number of high profile large projects.


    Subversion - Centralized version control system http://subversion.apache.org/
    • Available for MS Windows, Linux, Mac
    • Standard plugins for Visual Studio (http://www.visualsvn.com/visualsvn/) and Eclipse (http://subclipse.tigris.org/).
    • TortoiseSVN (http://tortoisesvn.net/) is a standard gui that integrates into Windows Explorer (MS Windows) as a context sensitive menu (usually right-click on a file to see options)
    • Requires server
    • The O'Reilly Press Subversion book is available as a freely available ebook (http://svnbook.red-bean.com/)
    • Many tutorials available

    Git - Decentralized version control system
    • Built on UNIX shell and Perl. For Windows, this seems to require that CYGWIN or MSYS be installed to provide UNIX shell services on Windows.

    Mercurial - Decentralized version control system
    http://mercurial.selenic.com/
    • Available for MS Windows, Linux, Mac
    • Multiple plugins for Visual Studio (http://visualhg.codeplex.com/) and Eclipse (http://javaforge.com/project/HGE).
    • TortoiseHg (http://mercurial.selenic.com/wiki/TortoiseHg) is a standard gui that integrates into Windows Explorer (MS Windows) or Nautilus (Linux file explorer) as a context sensitive menu (usually right-click on a file to see options)
    • The O'Reilly Press Mercurial book is available as a freely available ebook
    • Some tutorials available. http://hginit.com has an introduction to version control tutorial.
    • Also http://mercurial.selenic.com/wiki/UnderstandingMercurial and a tutorial (http://mercurial.selenic.com/wiki/Tutorial) and a Quick Start guide (http://mercurial.selenic.com/wiki/QuickStart)


    MS Visual Source Safe / MS Team Foundation Server / IBM Clear Case are commercial Centralized VCS systems that are often used. In corporate environments they are often mandated by upper management because of their connections with Microsoft and IBM. Comments from working programmers are near-universally derogatory. The complaints include too tight integration with other vendor tools (so if an environment is not in MS Visual Studio, it is very difficult to get it into VSS/TFS (e.g. LaTeX files) ) In addition, there are numerous complaints that the repositories are difficult to manage, to the extent that it seems to be very easy to corrupt a repository, (making it useless)

    There are other open source and commercial VCS systems (e.g. CVS, Perforce, AccuRev, Bazaar). Subversion, Git and Mercurial were chosen as the comparison set because as a set they are consistently are viewed as superior to others in comparisons among VCS. Note that because distributed VCS is so new (2005), comparisons more then 2 years old should be considered obsolete.


    Some references:

    Overview of Version Control tools by Martin Fowler (writer and consultant on organizing programming teams)
    IBM DeveloperWorks article on Introduction to Distributed Version Control Systems

Monday, July 05, 2010

How can you bring a life into this world?

I remember conversations about this when I was in Grad school (note: not with other grad students). While some of this may be just usual 20 something angst, at the time the local pastor was also proclaiming that our entire social circle were a group of social freaks. When God declares this view of you, a certain allowance of cynicism towards life and the world could be understandable.

Are there things to be depressed about? The candidate list is fairly long. Among the list of actions that I have engaged in that have been described as evil and/or warranting eternal damnation at one time or another include working in academics, deploying and working in a combat zone, work with the Red Cross, catching a falling hiker, organizing social activities (both with undesirables as well as including people I should not), associating with doctors, lawyers, police, diplomats, responding to calls for help, (list goes on. Note that no one person would hold the entire list against me, just their own selected parts as their moral authority deems fit.)

My wife and I have the fortune of knowing and counting as friends people with a wide range of history, interest and backgrounds. We know both the wealthy as well as those who have chosen to be simple. Those who are world class in their chosen pursuits, and others who may or may not have a college education. Doctors, lawyers, engineers, tradesmen and craftsmen who take pride in the attributes and high callings of their professions. Christian, Buddhist, Jew, agnostic and atheists. And for each of these, those who view those as moral inferiors.

As we have gotten older, we recognize that our group of friends, relations and acquaintances has been narrowing over the years. And we've been told that would be the case. But we have also hoped that we would maintain a range of friends. Because someday, we would be starting a family.

We get asked sometimes if we hope that our son will be just like us. Both of us say absolutely not. Because as much as we enjoy life, neither of us think you can ask someone to take the paths we've taken. While it is entirely possible that he may choose to take life in a similar direction, that may not happen. And we want people we know and trust to be companions along the way.

What do we hope that he learns? We hope that he learns that people are interesting and have stories that are worth getting to know. Deeply.

We hope that he learns that there is value in learning and understanding something deeply. To learn to recognize what good looks like in any field of endeavor, and that it is worth striving to meet that standard.

We hope that he learns to value the creative, the ones who find ways to do the difficult tasks that have never been done. We hope that he decides that difficult things are worth doing. And, if he is good enough, that difficult things are the things that are worth his time, energy and creativity.

Is this guaranteed? No. As much as we hold certain values, we are fully aware that we are around people who scorn those values. And our son will be exposed to them. And along the way he will choose. But we can ensure he knows the choice he makes.

In the end, the goal of life is not the avoidance of things that are bad, but the striving for the things that are good. Our child may not achieve all of his dreams and will experience pain, suffering and hurt along the way. But he can also make choices, that we hope are those that lead to things beautiful and useful. And the stories he will create along the way, and the stories we build with him are something worth looking forward to.

Friday, July 02, 2010

Flag raising July 4, 2007


Flag raising July 4, 2007
Originally uploaded by LugerLA
So I reject the notion that the American moment has passed. I dismiss the cynics who say that this new century cannot be another when, in the words of President Franklin Roosevelt, we lead the world in battling immediate evils and promoting the ultimate good.

I still believe that America is the last, best hope of Earth. We just have to show the world why this is so.

- Barack Obama, September 2007

Monday, June 28, 2010

June 28, 2008

From Wedding Dancing


I think that if we thought about it in a purely abstract way, neither my wife nor I would be inclined toward marriage. Most of what we have heard about marriage from those who claim it as wonderful did not have all that much appeal. Well meaning friends assured us that it would be the end of all the things that made life interesting. My wife was assured that I would settle down and become normal. And the idea that marriage would make either of us complete or whole or mean settling down was frankly horrifying. Because neither of us was done growing or exploring our world or changing.

But marriage, and relationships, is not something that is meant to be discussed in the abstract. I have held that discussions on relationships are only interesting when there are names involved. And when asked about how I knew that this is the person I want to marry, my response has been that it was not about who I was getting married to, it was what we would become and how we would get there. And that is what I was getting.

Married life has been surprisingly easy. One other person who had commented on married life being easy likened married life to moving furniture around in the house. There are changes in life, but they are minor compared to the steadiness of the foundation. In our case, it was like moving furniture around, but each of us would have been moving the furniture around anyway, and had considerable flexibility on different furniture arrangements. Marriage did not mean we had to stop growing, changing, or even reinventing ourselves along the way. Neither of us is the same person as when we started dating, or even when we go married. And we have not gotten bored.

Will it stay that way? The same person who described marriage as like moving furniture also described being a parent as tearing down and rebuilding a house while living inside it. Of course, I've done that before :-)

Strange how you know inside me
I measure the time and I stand amazed
Strange how I know inside you
My hand is outstretched toward the damp of the haze

And of course I forgive
I've seen how you live
Like a phoenix you rise from the ashes
You pick up the pieces
And the ghosts in the attic
They never quite leave
And of course I forgive
You've seen how I live
I've got darkness and fears to appease
My voices and analogies
Ambitions like ribbons
Worn bright on my sleeve

Strange how we know each other

Strange how I fit into you
There's a distance erased with the greatest of ease
Strange how you fit into me
A gentle warmth filling the deepest of needs

And with each passing day
The stories we say
Draw us tighter into our addiction
Confirm our conviction
That some kind of miracle
Passed on our heads
And how I am sure
Like never before
Of my reasons for defying reason
Embracing the seasons
We dance through the colors
Both followed and led

Strange how we fit each other

Strange how certain the journey
Time unfolds the petals
For our eyes to see
Strange how this journey's hurting
In ways we accept as part of fate's decree

So we just hold on fast
Acknowledge the past
As lessons exquisitely crafted
Painstakingly drafted
To carve us as instruments
That play the music of life
For we don't realize
Our faith in the prize
Unless it's been somehow elusive
How swiftly we choose it
The sacred simplicity
Of you at my side

- Eric's Song, Vienna Teng

Sunday, June 20, 2010

Rachel Carson Challenge 2010

Saturday was the 2010 Rachel Carson Challenge (notes from previous Rachel Carson Challenges are here). My partner in crime this time was SS, who decided this past winter when things were rather boring that she needed a hobby, and this need of a hobby led her to the Rachel Carson challenge. As usual, we did the series of training hikes (Hi Donna! Hi Bob!) that included wet days and hot days. (I missed the really hot sunny day, figures)

Rachel Carson 2010 Challenge registration

The challenge began with waking up at ~3 AM in the morning so we could catch the bus to Harrison Hills Park. And we did with time to spare before sunrise.

Waiting in the pre-dawn morning for the start for the 2010 Rachel Carson Challenge

We raced through the first section, keenly aware that we wanted to cover miles before it got sunny. By the first checkpoint, everything was still sunny and good.

Checkpoint one -  still in good shape

By the second checkpoint I was running into trouble. I had run out of water along the way, and the second checkpoint had run out of gatorade. (and forgotten my extra bottles of water in the kitchen on the way out the door) So by checkpoint 3 I was starting to dehydrate. Checkpoint 3 was a definite rehydration stop. I filled up my camelbak with gatorade with the goal of finishing it before I left while I was essentially eating lunch. In addition to the usual PB&J sandwiches, oranges, bananas, pretzels and chips there were salted potatoes. But I realized that I was not going to speed up anytime soon so SS found a group and went on ahead. I started from Checkpoint 3 and things got better for me as electrolytes were absorbed into my body.

The auto junkyard along the Rachel Carson trail

The Rachel Carson Trail is a connector trail. It connects a number of county and municipal parks in Allegheny County, starting in Harrison Hills Park and going through Agan Park, Emmerling Park, Hampton Community Park, and ending in North Park. (MapMyHike link). Allegheny County is an urban county (includes Pittsburgh, PA) so to connect all these parks means that there is substantial private property and hiking along roads along the way. There are numerous hills (i.e. too steep for building roads or houses) and streams without bridges on the trail.

By checkpoint four, I was feeling pretty good. And I had four hours to go the last 8.2 miles. No problem. But the clouds were rolling in. And about an hour after I left checkpoint four it started raining. And heavily. And thunder. I found a group that was working through Hampton Community Park together and we made it across Route 8 together. Then the trail started to follow Pine Creek. And by follow I mean we had to cross it. Five times.

Raging streams after a thunderstorm

The creek in the areas we had to cross it ranged from 20 to 30 feet across. While normally it is a shallow gravel stream bed with water about an inch above the gravel, that day after the thunderstorm it was a raging stream thigh deep. I hooked up with J and J from our little group and we crossed the streams together, holding arms to keep each other from being knocked down and dragged by the current.



After this major adventure, we reached North Park. There were four relatively easy stream crossing (much higher than normal, but by this point they were easy), and then the trail went up and into the park proper. A couple miles here and on to one last stream crossing and to the finish at Beaver Shelter.

Finishing with a run

Why do something like this? Like a t-shirt says, it is called the Rachel Carson Challenge, not the Rachel Carson Walk. It is a challenge. And like anything worthy of the name, it is hard. I tend not to be a competitive person by nature, but I am drawn to things that are hard.

J, J and I at the finish

There is also the inherent honesty and reality to such things. You are dealing with nature in a raw and unforgiving form. Heat, sun, dehydration, nutrition, physical limits, water, streams, hills are real. There is no recourse to decisions made by authority that is granted by God or Man. There are people who believe that perception is reality. And on a trail such as this, even in the urban area of Pittsburgh, that is wrong. Perception is not reality and believing otherwise can get you killed. Reality is reality, and there are enough people who believe otherwise that a challenge like this with people who recognize this is a wonderful experience.

Many thanks to SS, for being a wonderful training and hiking companion. Donna, Bob, Mark and many other volunteers for your work (including washing everything today [Sunday]) J, J, E and KB3OGS for being companions along the way. And looking forward to the next challenge. As a volunteer.

SS and I at the finish

Wednesday, May 12, 2010

Why is the Silk Screen Asian Film Festival valuable?

At last Friday's Silk Screen Film Festival Gala, I was one of many who were interviewed by a local TV crew. One of the questions asked was what makes Silk Screen valuable to Pittsburgh. Now, I hardly claim to represent Pittsburgh, but I can think about what makes Silk Screen, and film festivals in general, valuable to me.

Now, for sheer variety of selection, we have things like Netflix that have an overwhelming selection of films. And what makes Netflix special is not that it mails these movies to my home, but that it has a selection of everything under the sun, including the most obscure (my wife and I imagine that the Netflix computers that analyze movie selections must have a real fun time working with us) and foreign films. But while Netflix computers can recommend movies similar to what you have seen before, what it would not do is expose you to something completely different.

Those who watch media have noted that over the last few years it has become increasingly fragmented. It is very easy now to see only what reinforces your current beliefs, views, opinions and way of life.

But, for me, life has not yet become a routine of the same. And given my age, I'm starting to wonder (and hope!) that it does not (since I think for most people have settled into a set routine by now). There is not a week that goes by that I don't have to deal with something that, if not completely new, is something I do not expect to deal with often. While it makes for an interesting life, I only get one of these, so do not have the benefit of experience (to be fair, I'm often in situations where noone involved has this benefit.) What film (and works of fiction in general) do is provide a window into different ways of seeing a situation, working out alternatives, and providing a mirror that asks what is it that you value. While it cannot be expected that the movie or book describe any real situation exactly (after all, it becomes a sample of 1), it can teach you to see things from several viewpoints. And if not teach you what to do, at least show you what you do not want to happen.

And Silk Screen. The festival takes on the role of an editor or reviewer. Of the myriad of choices out there, where to find the gems. And Silk Screen identifies films worthy of my time and attention, and brings them here to Pittsburgh. Showing me the world through a set of eyes I may not have found on my own here. And for that I am thankful.

See you at the movies of the Silk Screen Asian Film Festival in Pittsburgh.

Monday, May 10, 2010

PSO: Thinking about talent

[Originally posted at Pittsburgh Symphony Orchestra: PSO Blogs]

Listening to Hilary Hahn starting off Sibelius Concerto I had to think about what constitutes talent. I have to recognize the reality that most of the performers (and just about all of our wonderful guest) are at a technical proficiency well beyond my ability to judge. The sheer volume of performers that come out of the world’s music schools and conservancy’s will ensure that only those that are the most skilled make their way into our notice. But there is more to talent than skill. And you realize this when listening to Ms. Hahn, who commands your attention without flash.

In my profession, computers are the instrument of use. Because for all the work we do, at some point our work interacts with the world through data, and through a computer program that takes our understanding and uses it to interpret the data. The risk is to forget that the value of the work lies in the understanding that went into the program and the interpretation of the results, not in the program itself. But this is easy to forget, especially if only viewing it from the outside. From a surface understanding, one can only see a computer and an operator. And in the shallowness of the moment, believe that the talent is the talent of the operator. But this is a trap. The point where you need to make the investment and have the best people is with the person who designs the analysis and interprets the results. Not the person to implements it and operates the computer. To implement the procedures and run a program is (comparatively) easy. Understanding is hard.

Similarly in arts, at the level under consideration, the technical capability of the performers is not a consideration. Everyone who graces the stage at Heinz Hall has demonstrated mastery of the instrument throughout its range. But we can ask for considerably more. We can ask from our interpreters (conductor and musicians) for not just the ability to recreate the written record of composers past, but to imagine what if some things were different, to use the creativity of the composer as a point of departure and develop an interpretation that includes the aspects that cannot be expressed in ink on paper. Then present that interpretation.

After that, Aaron Copeland said that art (music) is a collaboration between composer, interpreter and audience. Once the composer and interpreter have done their part, it is our turn to do ours.

Wednesday, May 05, 2010

Allegheny County Public Service Net - 9:00 PM 5 May 2010

This is KB3OGQ representing the American Red Cross as net control station for the Allegheny County Public Service Net. This Net meets every Wednesday night at 9:00 PM local time on the North Hills Amateur Radio Club Repeater, the W3EXW repeater on 147.09 MHz. The back up repeater is the Gateway FM Association repeater, the WA3PBD repeater on 146.73 MHz. In the event this repeater should fail, wait 2 minutes. If this repeater does not return to operation, switch to the back up. Is there any emergency or priority traffic - if so call KB3OGQ.
(pause)
Hearing None. This is a directed net, alerted for the purpose of a training drill. When I call the roll please give your call and state if you have any comments for the net.
(roll call)
I will now take additional check ins. You do not have to be a member of ARES or RACES, or be from Allegheny County to check in. Please give your call, name and location.
(take check ins)
Are there any additional check ins.
(pause)
I would like to thank the North Hills Amateur Radio Club for use of the repeater. I will now close the net and return the repeater to general amateur radio use.


And so went my first experience as net control. Thanks to everyone for being nice :-)

A Taste of Art: the student run restaurant at the Art Institute of Pittsburgh



A Taste of Art
420 Boulevard of the Allies
Pittsburgh, PA 15219-1301
412-291-6532
http://www.artinstitutes.edu/pittsburgh/StudentLife/resturaunt.aspx
(Note: check website and make reservations as menu and times change over the course of the year)

A Taste of Art is a student operated restaurant at the Art Institute of Pittsburgh. It is operated by the A la Carte class in the Culinary Arts program. They are supervised by their instructor, who informed us that the students spend the first two weeks of the semester developing a menu, costing it, and deciding on dishes from those created by them that fit the theme chosen by the instructors (this semester is Mexican). By week three, the restaurant opens and students rotate through the positions both in the kitchen and hospitality staff. (the instructor told us that when they first open, the students in hospitality are terrified at dealing with actual customers).

We enjoyed talking with the instructor, who was modeling the practice of hospitality like good owners do.

For the food, we had appetizer, main dishes and dessert. The appetizer was interesting, the dessert wonderful in creativity and flavor (we had Blueberry Bird's nest and Banana cheesecake and something else I don't remember).

However, the main dishes left something to be desired. We had steak salad and beer braised turkey tacos. Both of them were lacking in flavor. Disappointing. We wish the students would be more aggressive in trying something creative.

A fun place for a different lunch in downtown Pittsburgh. Definitely go for an inexpensive meal (entrees $6.50 - $8)

Tuesday, May 04, 2010

Lessons Observed: Teaching Design of Experiments

This past semester I taught Design of Experiments. The primary reason I was teaching this was that this is the point of departure from one of my research areas. In particular my PhD student's thesis builds on this field, and he had never taken design of experiments. The course had not been taught in this department for years, so I offered to teach it. I ended up getting my students, and a MBA who was working at a local manufacturing company.

1. Textbook - I used Dean and Voss Design and Analysis of Experiments. This is a very comprehensive text. For this purpose, it was overkill. It covers methods in depth. So much so that it went into areas that showed the weakness in the use of software packages. So the SAS code they have to give for examples is quite sophisticated. Minitab, as far as we could tell, was completely outclassed by the end of the course. I was doing everything in R. But I believe what my students decided that I was a better programmer then they were. For statistics majors, this is probably the right book. And I picked it because it gave perfect lead ins into some topics I wanted to learn. But it was too ambitious (and I was not even trying to cover the whole book. I was using a slightly modified version of their sample curricula) But the next time I teach this I would use Box and Hunter. Which has the advantage of having an associated R package for examples. One real good aspect of Dean and Voss are the datasets. They made a point of having real data sets in the examples and in the homework sets. So we were forced to deal with messy data.

2. Material - I was actually learning some of the material myself along the way, since I had not taken a true DoE course (only one focused on applications in simulation). So some of the lectures took me a long time to prepare. On the other hand, I found that I was developing a deeper understanding of statistical methods. In particular, I now think if multiple comparisons is an issue whenever using statistical inferences. When Tom Siegfried wrote his Science News editorial Odds Are, It's Wrong: Science fails to face the shortcomings of statistics, I was able to identify just what the misuse of statistics was for all of his points (except for the Bayesian, because I have not had much exposure to Bayesian methods.) So I learned alot about the underlying assumptions of a many statistical methods. And one of my students is actually a statistics Ph.D. student, so someone was around to keep me honest.

3. Software. The book uses SAS. I used R. My own graduate students started in Minitab and switched to R as the material in the book reached the limits of what Minitab could be made to do. The MBA stuck with Minitab and we had to live with its limits. I ended up getting much better at R and Sweave (because I forced myself to use it for everything, even when no package was found for a method). Even redoing Dean and Voss examples. I am now a big fan of list comprehensions and I think I can almost program in a functional style (as opposed to procedural and object style). I won't say I like R better then Python, but I am almost as fluent now.

4. Summary. This course took a lot of time. Partly because I was learning much of it as I went along. And I was also learning the tools as well (R and Sweave). It is gratifying to know that I actually taught something useful. The MBA student has started using the material at work (and can now go toe-to-toe with the Six Sigma Black Belts in his company when talking statistics). My PhD student incorporated some of the material into his proposal. He also keeps saying that he wish he took this class years ago (he said this after the last class I taught, which was basically created for him). And my statistics student seems to have learned a lot about working with real data. (Dean and Voss have a lot of real, and messy, data sets.) But in the future, I think I'm going to find textbooks where I can also get some solved problems, because this was a lot of work for a single class.

Wednesday, April 21, 2010

PSO: What makes a classic?

[Originally posted at Pittsburgh Symphony Orchestra: Outside Perspectives]


Two pieces. One was first performed even before it was fully written, with the composer partly filling in the parts as he played. The other solid in style, but had the misfortune of opening alongside a piece that incited great and vigorous argument, and therefore went into obscurity. Clearly the outcomes are not related to the work and effort that went into them, but somewhere there is something else.


I have two students who are presenting their plans for their ongoing efforts this week. Both are engaged in a creative work, building on what has been done before, moving in directions that are unknown. Along the way they will be questioned, their beliefs and assumptions challenged, their thinking sharpened. And both do so with hopes that they are building something of enduring value (in addition to completing a project!)


But realistically, not everything is of such value. Looking at concert music, it is almost unfair comparing pieces from centuries past to music from the past century. But it is not because of the composer, but the mere fact that pieces are still played means they survived and were found worthy of remaining a part of the repertoire, while younger pieces have not finished this winnowing process. And with my students (and myself for that matter), it is not just the effort that goes into the work, but the many decisions and choices of those who come next, when they consider what is worth commenting on, and worth building upon, that will ultimately determine any enduring value in what we create.


But does that mean that the work is only of value because it is known or because others build upon it? In a sense, because what we are doing is a creative work, its value will be in part how it effects conversation in our field (measured by people choosing to react to it and build up on it or take it in new directions.) But there is more. Henri Poincare wrote about what scientists study. It is not just that the study of our world is useful (although it is), but what we study is beautiful, and in that captures our attention, and rewards us for efforts beyond the remuneration we receive. And I'm looking forward to the years to come, that they may be devoted to efforts that I can say that I delight in them, and uncover both the beautiful and useful, whether enduring or obscure.

Sunday, April 11, 2010

PSO: Avalanches and pebbles

[Originally posted at the Pittsburgh Symphony: Outside Perspectives]

Listening to Prokofiev Symphony No. 5 made me think of the tides of history. The movements started with transparent motifs that made one think of someone exploring life and his world. But each movement soon descended into a deep foreboding mass of power and force, making the initial moments of carefree joy meaningless.

When I was younger, it was easy to think that the world moved on its own, and there was nothing you could do to influence events, or even your own fate. It was easy to think that everything was chance. In the TV show "Babylon 5", a significant quote is "The avalanche has started, it is too late for the pebbles to vote."

And now? Between me and my wife's family we have direct experience in three wars. Our stories sound like history books and newspaper stories. We have no illusions about personal impact on the course of history, but neither are we merely swept along with the tides. We see and notice how people are swayed, pulled by their fears, or resigned to insignificance by those who would scream the loudest. And for Prokofiev in Stalin's Soviet Union, where work done with the approval of one set of leaders would suddenly be denounced in another time, it would seem that way, a powerless man swept by the tides of history, subject to its whims and caprices.

But, as statistician/political scientist/artist Edward Tufte remarked just yesterday here in Pittsburgh, we do not live in that kind of place or that kind of time. We live in a place and time that allows us to make choices, take risks and adapt to our changing world instead of only following the herd. And as we do so we can bear the cost, reap the rewards. And live other then as sheep who follow where those play on our fears would lead us. For all its cost, we recognise there is no other place like that on this earth, and we rejoice in it.

Thursday, April 08, 2010

Edward Tufte: An Academic and Otherwise Life An n=1

Edward R. Tufte: The Visual Display of Quantitative Information

The Carnegie Mellon University has a lecture series "Journeys" where the speaker (usually a CMU professor) talks about what is important in life. A famous example of this was Randy Pausch's talk that was played in various forms (and also presented on Oprah) as well as turned into a book. Edward Tufte is best known for work on presenting data. He gave a talk yesterday about data presentation. Today's talk was on life. n=1 is an acknowledgement that these are observations based on a sample of 1, himself. With the statistician's view of how well you can generalize from that (not at all.)

His story is one of a polymath. His was an academic track. But while his degree is in statistics, his first academic job was political economy, and he has had positions in Political Science, statistics and computer science. And he is a "B-rate" artist (meaning he can get his work shown in B-rate galleries.) But this talk is advertised about being about academics.

One of his learning moments was the encouragement to do work of lasting value. He started out as a political economy, working on things very up to date, like results of the last (or next) election. Just like untold multitude's of junior political science professors. And the parallel in any field is to look for 'hot' topics. Which change like the wind. He says the reason he was able to jump from field to field was his ability to look at a field and identify what the key issues of the field were, and spend his time working on those. His point is that much of the academic world becomes focused on itself, on its own controversies and issues of the profession. So that he was always able to enter a field and distinguish himself by ignoring that and focusing on the knowledge of the subject itself.

There is a researcher working with us that I've been trying to give some advice. And one was telling him that one of the primary skills that should have been developed when he was getting his Ph.D. was the ability to identify what was important and what was trivial detail. Does this work? My grad students and the post-docs I work with have noticed that when I turn my attention to something, I learn and pick out the important details of papers and texts (in new areas) faster then they can. And I am reasonably good about telling them a few weeks in advance what they will need to know and be able to do down the line in our projects.

I think Tufte touches one of the reasons I was not that interested in academia. I was more interested in actual problems and issues, not so much in what an academic profession thought of as an issue. And in my exploration of academia, that is one thing that I bring to my host department, I probably deal with the messiness of the real data better then anyone else there. Tufte made the comment that it is instructive to observe how the data that you are using is collected, because they give you insight. In my case, some of the data sets I use have my name in the recorder block. Because I was the one writing the report at 2:00 in the morning. And I have to agree, that is useful knowledge. I hope that it is an advantage that I can make useful.

Sunday, March 28, 2010

Eclipse setup notes: R (StatEt) and Python (Sage)

My standard Eclipse setup consists of the following extensions:
  • Texclipse
  • StatEt (for R and Sweave)
  • Pydev
  • Data Tools
  • BIRT
And I also have these loaded, even if I don't use them as much
  • CDT (C/C++ Developers tools)
  • Java (since it comes with)
  • Subversion
For a while I've been using StatEt using the R console, because I had not gotten the RJava console to work. While it works, it has two problems (1) it does not open a graphics display, so you could not see the plots you were making (But plots are still generated and included into Sweave documents) and (2) it would drop out if there were any errors in the R code, causing you to have to start over.

The trick with getting RJava to work is set the configuration in the JRE tab in eclipse. In the VM Arguments, there should be an option included that points to rJava (which you have installed and run
sudo R CMD javareconf
to enable)

-Drjava.path=/path.to/rJava

(where the /path.to/ is your path to the location you installed your rJava library in the R directory. On my system it is /home/my_account/R/i486-pc-linux-gnu-library/2.9/ )

This provides a stable interactive R console and allows Sweave.

For Python, in addition to the standard interpreters (python, jython, ipy), you can run Sage. This would be through using the Python interpreter that is in the Sage package.

So add another Python interprester pointing to /sage-4.x.x/bin/python
With $SAGE_ROOT = /path/to/sage-4.x.x
and LD_LIBRARY_PATH = $SAGE_ROOT/local/lib

Next steps, figure out how to add R libraries to the R included in Sage, so R packages can be called from within Sage (note that R can be called using the rpy2 package, but this is only the currently installed packages.)

Wednesday, March 24, 2010

PSO: A conversation with strings that are different

[Originally posted at the Pittsburgh Symphony Orchestra: Outside Perspectives]


Having a viola as soloist was a change from the usual piano or violin guest artist. I was laughing reading the program notes saying that Berlioz Harold in Italy was written for Paganini, who complained that it did not allow him to play enough. Because Berlioz wrote a different kind of piece.


While it may not have satisfied a violin virtuoso, what Berlioz gave us was a conversation. Instead of the violin soaring exuberantly, we were treated to viola, harp, and flutes passing their lines to one another. Each different, yet fitting together like old friends engaged in conversation.


My wife and I have not been married long, but we sometimes get to enjoy the moments where we can talk about subjects ending with the wonder "you think about that too!?", the times when we can finish each other's thoughts (which is real useful when one has trouble coming up with the next word), and "magic" around the house. But, in our unsentimental times, we have some understanding of how the "magic" happens, it is the paying attention to each other and around us, and it almost seems natural. So it is with the first movements of Harold. The principals are not the type to overwhelm with brilliance, instead we hear them play with each other, bow, pluck and wind. Appreciative both of the differences and their ability to be together. And hoping life will be like that as well.

Sunday, March 07, 2010

Is it [being married] all that you expected?

Somehow, we (the married for ~20 months couple) got asked if "being married was all we expected?" We did not really answer the question. And I'm not sure we had expectations all things considered. Marriage was more something we got into thinking we could make work more then something we had dreams and aspirations for. Of course, a relationship seemed the same, it was something that could work, more then something of dreams.

There are lots of examples of things to be afraid of. We both know people whose lives lost much in richness, became uninteresting, and definition when they became involved in romantic relationships, and replaced what we knew with a life completely defined only by their relationship, viewing the world only through the lens of romantic relationships, and viewing those who did not share this with disdain. I know of others who viewed their romantic relationships as prizes and possesions, that they would rather have the partner dead then with others, with all the righteousness of their God to justify them. And we have known people who were the possession or prize.

Did this happen with us? Some old interests faded away. Although living it, it feels like this is the natural progressions of interests, in the course of events our interests change, some fade away, others are added, and hopefully some get deeper. But having someone else there changes the direction. It is not that we share all the same interests (or that is ever going to happen, as anyone who knows us will no doubt affirm), but others are shared, and sharpened. Because there is little that sharpens more then someone else who can challenge, affirm, question, and support in ones endeavours and goals.

But this was not something that would lead to marriage. In the end the question was about living life. To take in the joys and the challenges, life's uncertainties and the rewards that may or may not be there. To recognise there are no guarantees in life, not even what is in life right now.

When we were dating, someone told me that the time we were apart when I was deployed overseas did not count when considering the time in relationship. I disagree. One of the results is that our relationship was stressed. It would not be the first such stress. My wife has joked that she thinks she found herself in a movie plot. And no doubt there will be more stresses and changes to come. And we will both change along the way as these stresses come, so it was good to learn how this happens. And probably even more important to learn how we undergo change then what the changes actually were. Neither of us is the same as the person we were when we met, when we got engaged, or when we got married. And it is better that way.