Thursday, December 30, 2010

Parenting: Month 2

Tomie's Three Bears
Originally uploaded by LugerLA
All the baby books say month 1 is the time of upheaval and month 2 is a settling in period. Month 1 seemed fairly straight forward in retrospect. Of course, he was just a blob and his job was eat, sleep, pee and poop. And he was very well mannered for the first month. Month 2 we have a real baby that fusses and cries. The in-laws arrived for the grandparent shift change, the night we went to the emergency room for the first time. They are probably wondering if we were lying about the easy going baby we had.

Some notes along the way

- Doctor gave the dreaded diagnosis - colic. (AKA pediatrician does not know why baby is crying, but the parents better steel themselves for three months of this) Actually, if this is colic, we'll take it and run, because this is easier then what we thought colic was.

- We still have a big blob. He started out as a big boy, and he is staying big. Problem is, most babies his size are older and have learned to crawl. But in his case, we have to do all the exercising for him. Lot's of bicycling time. But that does not come close to what a self-mobile baby does. Good thing he is sick so he does not eat so much. (of course, he is still gaining weight, so no doctor is going to worry too much about him being sick)

- Colic and constipation = complexity. It's getting harder to keep track of everything that we're working on

- He is a bit of a chicken. Lots of things scare him. One of the problems is that it is so cold, so we have not been bringing him out of the house where he can be exposed to other things which is what is supposed to take care of this. (Hint: we need visitors. Call us and come by.)

- Baby gear. We love the Medela line of breast feeding products. We hope that whoever coordinates/manages/develops that line great prosperity for lifetimes to come. That makes life so much easier.

- Baby gear 2 - I like my ring sling. I have a Maya sling that is great because I can carry him and do something else while he is wailing away (or threatening to wail away) or when I'm just holding him asleep (i.e. he would not be sleeping if I was not holding him). This usually means playing music on a CD, iPod or reading on the Kindle. And I can keep this up for a few hours (i.e. the time between feedings). Of course, I am the only one who can use it. We have a Baby Bjorn that mom and grandpa can use, but he needs to be in a very good mood to get in that.

- Holidays - We are very unsentimental about holidays, birthdays, other special events. We're told it might change as he grows up. But not yet.

- Gadgets - non-baby. I'm getting a lot of reading done with the Kindle. What makes it work is that it is light, so I can hold it for extended periods of time with a couple fingers while I'm holding him. If it was closer to a pound, it would get problematic after the first hour or so.

- Carrying - I enjoy holding him. Awake, asleep, happy (even crying). Standing still, sitting down, laying down, dancing (waltz). I'd probably hold him even more if I didn't have to work.

At two months, he clearly dominates our lives. Although we are fighting to see that the world does not completely revolve around him. Mom and grandma are discussing what classes he will be taking (after all, he going on three months). Competitions to enter. And of course, noting that no child of two endurance athletes has a chance of being a sloth. But for now, we enjoy being parents. So far.

Monday, December 27, 2010

Book Review: Data Analysis with Open Source Tools by Philipp Janert

Data Analysis with Open Source ToolsData Analysis with Open Source Tools by Philipp K Janert

My rating: 5 of 5 stars

This is a book that is how to think about data analysis, not only how to perform data analysis. Like a good data analysis, Janert's book is about insight and comprehension, not computation. And because of this it should be a part of any analysts bookshelf, set apart from all the books that merely teach tools and techniques.

The practice of data analysis can get a bad rap, especially by those who think that data analysis is only statistics. Most books on data analysis don’t help because they focus on using the features of a particular tool, leading to the view that data analysis is following a recipe from a cookbook. This book subverts this by being principally of how to think about data analysis, and providing examples using different tools (primarily R and Python, but he uses other examples as well)

Among other topics, Janert covers graphing, single and multi-variable analysis, probability, data modeling, statistics, simulation, component analysis, reporting, financial modeling and predictive analytics. In each section he starts by explaining the concepts, what it is for, and (just as important) what each topic is not. Working through it you get a sense of not just what and how of the various tools and methods discussed, but why they are used as well as some ways these techniques are misapplied.

Janert also illustrates the methods using some data analysis environments. Principally R and Python (with Numpy, Scipy and Matplotlib), but also other tools such as Gnuplot and the Gnu Scientific Library. What is helpful here is the focus is on what techniques and capabilities are needed in the tool, not the tool itself. Instead of being a cheerleader for a particular tool, Janert discusses in his appendix the qualities that make environments such as Matlab, R and Python good data analysis environments. However, this focus means that he does not teach any particular tool. If you want to learn how to use a particular tool for data analysis, you are better off getting a book on R or Python (or Matlab, Excel, etc.)

The book page at O' is here: Data Analysis with Open Source Tools

I review for the O'Reilly Blogger Review Program

View all my reviews

Sunday, December 19, 2010

Lessons Observed: Learning Bayesian Methods

I've been working with one of my students in a project that involves identifying a proper probability distribution and parameters for a fairly complex and diverse data set. As we did our literature review, one thing that was very unsatisfying was the fact that many published papers either used data that was unavailable at the time needed, or employed magic numbers as part of their method (magic numbers are arbitrarily chosen constants). As she did her literature review, we discovered the applications of Bayesian methods. But neither of us had any experience in using this. At the same time, my PhD student had a problem that we uncovered during his proposal presentation. He needed another course. Solution. We'll have an independent study on Bayesian methods with three of us.

We used as a basic text Carlin and Louis, Bayesian Methods for Data Analysis and Alberts, Bayesian Computation with R as a supplementary text. The alternative to Carlin and Louis would be Gelman et. al., Bayesian Data Analysis. We chose the Carlin and Louis text because it seemed to be more technical while Gelman et. al. was aimed at social scientists (as opposed to the mathematical disciplines we came from). (Note: all of these do require some level of programming using R)

While doing this we were also looking at various Markov Chain Monte Carlo (MCMC) toolkits. The best programmer was working with MCMCPack. The least experienced used WinBUGS and I used JAGS.

Lessons learned:

1. For independent study, I should be more forceful on making them do the exercises. By the time we were done, I had implemented many of the models, but I don't think my students did.

2. Carlin was good to work with. I had gotten the instructors solutions guide direct from him (although I did not use it). I also identified a problem in one of the data files for one of the case studies.

3. Of the three of us, JAGS was the only one we got to work well. We had a hard time formulating models in MCMCPack. WinBUGS would work, but it was only good for interactive use (if you called it from R, it would open its own window to do its work, which is a lot of overhead) and we needed something that could be used as a callable library because we needed to apply this to 1000's of cases.

4. There was a benefit to involving my students in learning this field. Because I knew nothing about it, I could model the process of learning a new field of knowledge to my students.


1. The project is turning out to be successful. We're doing comparative performance evaluation now and it does considerably better then the other methods in the literature. The fact that Bayesian methods blend expert knowledge and historical data in a systematic way gives it considerable face validity.

2. The student that I was working with is going back to her home university with an expectation that she will introduce Bayesian methods to faculty and other grad students in her statistics department (at a university outside the U.S.)

All in all, I think this experience was successful. Not that I am an expert in Bayesian methods, but this has led to very good results that I expect to see implemented on live data in the near future. And some insights on situations that allow Bayesian methods to be more useful then most applications of it.

Sunday, December 12, 2010

Book Review: Head First HTML With CSS & XHTML by Elizabeth Freeman and Eric Freeman

Head First HTML with CSS & XHTML (Head First)Head First HTML with CSS & XHTML by Elisabeth Freeman

My rating: 5 of 5 stars

This member of the Head First series teaches in an engaging way with every lesson providing the context and the why, not only what and how, of using HTML and CSS.

I have written web pages before, and even worked through some on-line tutorials. But having some colleagues gently remind me that my web page needed to be updated and filled out provides an opportunity to learn how to do this right.

Head First HTML with CSS & XHTML does a better job then others. The style of teaching lends itself very well. Three case studies (even if contrived) weave their way throughout the book. And having three case studies allow every new concept to be introduced in a usable context. Each chapter had several different kinds of exercises. For all of us who learn in different ways.

I appreciated many sections where they take a break from teaching to explain why certain features of XHTML and CSS were the way they were. So you are not only learning a lot of syntax, but you are also learning why HTML and CSS are the way they are, and how to use them as tools as a coherent whole. Making it easier to remember and retain what they are teaching (almost like learning from first principles in addition to the tutorial they are giving).

Book page at O'Reilly

I review for the O'Reilly Blogger Review Program

View all my reviews

Tuesday, December 07, 2010

Book Review: Baghdad at Sunrise by Peter Mansoor

Baghdad at Sunrise: A Brigade Commander's War in Iraq (Yale Library of Military History)Baghdad at Sunrise: A Brigade Commander's War in Iraq by Peter R. Mansoor

My rating: 5 of 5 stars

This is the memoir of a field-grade officer's tour in Iraq as a Armored brigade commander in 2006. It covers a period where U.S. military doctrine was being debated and changed from active denial that the U.S. was facing an insurgency to fully engaged in counter-insurgency. In particular, as a brigade commander Mansoor was exposed to both decisions from higher up as well as the reality on the ground.

Mansoor demonstrates the capabilities of those in the military. As some recognize (esp. Col Gian Gentile USA), as a practical matter, many in the U.S. military were very aware of tenets of low-intensity warfare from experience in the Balkans, Africa, northern Iraq and around SW Asia and SE Asia. And regardless of what their political masters may say, many have learned that these have to be dealt with, and the U.S. has experience and doctrine to do so, if it is followed.

So the book becomes a memoir of what he faced, how he dealt with the Iraqi people he was there to protect as well as the insurgency he was fighting. And how he handled both as well as the political and military senior leadership of the time (who did not have on-the-ground experience in these same areas). I found it to be candid, and worth reading the thoughts of those who attempted to carry out their countries missions in the unknown of war.

View all my reviews