Thursday, September 28, 2017

Refactoring the discussion

In software development we "refactor" our solutions all the time. Basically, this refers to arriving at the same result, but organizing the steps and structures of the program differently. Sometimes a refactor is as simple as renaming things to be clearer. Other times, it's a complete redesign. In the latter case, it's highly desirable to have a bunch of unit test cases to make sure that the program really does still perform the way it should when you're done messing with it.

I found that to be the case with the re-write of the theoretical section of my CISS paper. As I mentioned last week, I decided to re-frame the problem in terms of sampling efficiency rather than as a solution to the issue with heavy tails. I further discovered that it was a lot simpler to derive all my formulas before bringing stratification into the mix. Once I had everything demonstrated for the homogeneous case, it was pretty obvious how to generalize that to stratified data.

The rub, of course, was that in doing all this I might actually wind up with a different answer. That's where having a working prototype came in handy. After writing up all my results, I then verified that it matched what the program was actually doing. I'm glad I did this because I did have a couple minor errors in what I posted last week and they were immediately obvious when held up against the code. If you really care, I updated the post to correct the errors.

No comments:

Post a Comment