Stories from Norway

January 22nd:
Tonight was amazing. Bright aurora that you could see color in everywhere for several hours.

Is what I put on Facebook. We’ve been fairly busy and I’ve had other things to worry about so I’ve been bad about the blogging. That night we went out on deck after leaving Tromsø and there was a wonderful display. The lights stretched across most of the sky and one band was running North to South which is unusual. It was bright enough that you could see the green without the camera although it is not as bright and saturated as the camera sees. In another band you could see the rays shimmering and moving and it’s easy to see how people might have thought it was the souls of the dead walking to their afterlife. Unfortunately, it was cloudy below where the main display was so we mostly got a diffuse green glow there and the camera has clouds silhouetting the light and being lit from behind. After a while, I couldn’t say how long, I got cold enough that I came inside and copied my pictures onto the computer and as I was going through them I had a group of Germans come and watch over my shoulder and then later an English couple who asked me to send them one of the pictures. Then I looked up, out the observation deck window and saw a big green loop and threw my gloves and hat back on and ran back outside for part two.

The second bright display was equally dramatic and had more distinct features and movement, though none of it was overhead. It did have a large fan of lines which curved toward the ship which made a nice perspective view. After a while the display dwindled and the clouds moved in more and that was it for the evening. I’ve uploaded all of my pictures of the evening to http://thwartedagain.com/zenphoto/norway/Norway/ as per usual and I’m pretty happy with them. The camera settings I was using to get the bulk of them were 7″, f/2.8, ISO 2000. It was bright enough that I could drop the ISO a bit and the sea was calm enough to allow a longer exposure to make up for it. The stars still mostly have little movement trails but it’s not too bad and there is good detail and color in the aurora.

We have been very fortunate to see a display as good as this with the Earth and Solar weather being what they’ve been.

————————————————————————

January 24th:
We had a snow day today too.

While our friends and family back in Texas are having Snowpocalypse 2014, that being some freezing and a frosting of snow and ice, we spend the afternoon visiting Kirkenes (pron. Tchirknes) and the Snowhotel. The rooms of the Snowhotel are rebuilt every year. They melt enough to become uninhabitable in early spring and are gone shortly after. They make them by inflating “balloons” which are like bounce houses that are the room and hall shapes and then covering them with snow. After a few days the snow is packed and stable enough to deflate the forms. After that a team of Chinese artists come and make carvings in the walls, a different one for each room, and then the ice sculptures are moved in. There are also some non-snow Swiss cabins that are brought to the location for those who require a warmer night’s sleep. The beds and seats have closed cell foam and blankets and you sleep in a big down sleeping bag. The dining tables in the common room are giant slabs of carved ice and apparently the bar serves drinks in ice glasses although it wasn’t open when we were there.

There were high but heavy looking clouds the whole time and the sky was almost the same color as the snow covered landscape. It was pretty but kind of desolate.

Kirkenes is the turning point of the voyage and from there we started sailing back to Bergen.

————————————————————————

January 25th/26th:
We visited a lot of little ports on the 25th very briefly and then stopped in Tromsø at 11:45. Mom and I had signed up for the Arctic Cathedral midnight choral performance so we got off the ship, onto a tour bus and they drove us over the bridge to the cathedral. A lot of the churches and other buildings in Norway were rebuilt after the second world war because as the Russians drove back the German occupying forces the cities were burned to the ground to slow the advance. In a few places some buildings survived but a great many things are new and, as a result, have a modern feel to them. The Arctic Cathedral is very modern looking and is also very beautiful. It is essentially a series of nested triangular prisms with the doors and pipe organ on one end and an entire wall of stained glass on the end behind the altar. We have visited several churches that share this general design but it seems like this is this best example.

I was expecting something like a typical church choir, a few people in each of the usual vocal roles and maybe some organ music to accompany them. What we got instead was one man who played the organ and later a piano, a cellist and a single soprano. It was excellent. The church has a great sound and the singer was superb. She could make herself barely heard or fill the entire space and every sound was perfect. The instrumental accompaniment was equally good. I would have paid good money for a recording, knowing full well that my home stereo could not reproduce the magicial sound but strangely there was no recording on offer. It’s a shame really. We did get program with the performers names so hopefully I’ll be able to find out more about them and maybe even find something they have recorded.

Sadly aurora watching has been mostly a bust. There was a little green splotch hidden by bunch of clouds the night before. That night there was little to see as well. The clouds have been chasing us from Kirkenes.

————————————————————————

January 26th:

This evening we stopped in Svolvær and rather than eating dinner on the boat my mother dragged me out into town and made me try to order a pizza in Norsk. Our blonde pixie waitress greeted us and probably said something about what would we like or “your hat looks stupid” or something and I stammered “Jeg forstår bare lit Norsk” and was starting on “Snakker du Engelsk?” when she asked if I’d rather speak English.

So we got a pizza with pepperoni, pineapple (most of the pizzas had pineapple a.k.a. “ananas”), red bell pepper and some kind of ground meat. I got a Coca-Cola and mom got et glass øl.

So now we’ve indulged our Americanness and tomorrow it’s back to fish and reindeer stew and bowls full of berries covered in whipped cream. That last being not anything particularly Norwegian but rather what constitutes about half of lunch for mom.

Our stop tonight was in Svolvær again. We had previously gone on a walk with Inger and she had pointed out that most restaurants are closed on Sundays or have limited fare which had caused her trouble with a tour group in years past there. However, she continued, “Viva Italia” had a broad menu including Kebab, Pizza, Salads and other things. Mom had decided that instead of eating dinner on the ship we should go into town and find a restaurant to eat in, seemingly having forgotten the part about nothing being open. But we talked to Inger and remembered her story so we walked to Viva Italia. I was, of course, dreading having to try to order dinner for the two of us in a language in which I have a roughly 60 word vocabulary and have never tried on another human being, only responding when prompted by the audiobook playing on the car stereo while commuting to work in the mornings.

We walked into the restaurant and a tiny blonde woman, probably only 25 years old, if that, greeted us and took us to a table and then said a bunch of Norwegian things that I didn’t understand at all. I mustered all of my 16 lessons of Pimsleur Norwegian and informed her in broken, almost unintelligible Norwegian that I understood very little Norwegian and I was working on asking her if she spoke English but she got there ahead of me. So we ordered in English and she asked where we were from and we told her. She, it turns out, is not Norwegian either but rather Polish which means that she actually speaks at least three languages and I imagine probably more. Meeting people like that makes me feel completely useless but I suppose there’s nothing to be done aside from maybe try to learn more language.

Oddly enough, most of the pizzas had “ananas” a.k.a. pineapple. We got a large with pepperoni, pineapple, red bell pepper and some kind of ground meat. It was actually pretty good. They cut the pizza into squares rather than pie slices which was a little odd. Mom had the ubiquitous “Arctic” lager and I had a Coca-Cola. A little taste of home in the dark and cold.

Up on deck that evening we saw a few faint auroral arcs and one bright blob just on the horizon and then that was it. The sky was perfectly clear but there was a strong wind blowing from the west which meant rough seas and the ship was rolling and rocking which doesn’t do wonders for me and makes it basically impossible to take decent pictures. I watched the sky off and on until a little after midnight and then gave up and went to bed. That’s probably the end of the aurora for me for a good long while. It has been beautiful and awe-inspiring and I will miss it greatly. I could see coming back here for lights again or even in the summar since Norway, for all of its expense is welcoming and I’ve had fun. But I also would like to go to Iceland or Canada or Alaska and see the lights again there too. Canada would be exceptionally cold but supposedly north-eastern Iceland is a great place to see the lights and it stays reasonably warm even in the middle of winter because of its position in the gulf stream. Plus there’s lots of natural beauty there as well.

futility

The ol’ blog doesn’t allow comments and discourages search engine indexing now so basically putting things up here is somewhat pointless but I’m going to keep doing it.

I was talking about R and statistics and stuff and I ran into an interesting problem. Let’s say I have a csv file with data for a dependent, response variable W and three independent variables X, Y, and Z. Additionally, I have a second csv file with some additional values for the input variables. My goal is to produce a model for W in terms of X, Y and Z from the first data file and then see what the model predicts for the values of X, Y and Z in the second data file. If you had measured values for W in the second file then you could compare your predictions with the actual and get an idea of how good your model is. This is called out-of-sample model validation. Anyway, I load the data files like so:

> data <- read.csv("datafile.csv") > data2 <- read.csv("datafile2.csv")

However, if you don't have a handy data set you can just get R to fake one for you. Note that I've chosen different sizes here.

> data <- data.frame(W=rnorm(10), X=rnorm(10), Y=rnorm(10), Z=rnorm(10)) > data2 <- data.frame(W=rnorm(5), X=rnorm(5), Y=rnorm(5), Z=rnorm(5))

It turns out that there are two ways to make your linear model. The right way and the wrong way. The wrong way goes like this:

> lmfit <- lm(data$W ~ data$X + data$Y + data$Z) > print(lmfit$fitted.values)
1 2 3 4 5 6 7 8 9 10
-0.8562631 1.1639021 1.1048939 0.4355315 0.7493099 0.1484507 -0.8458088 -0.3278646 0.3195509 1.3771322

When you try to predict the values of W using data2 it will complain at you in a kind of unhelpful way.

> predW <- predict(lmfit, data2) Warning message:
'newdata' had 5 rows but variables found have 10 rows

> print(predW)
1 2 3 4 5 6 7 8 9 10
-0.8562631 1.1639021 1.1048939 0.4355315 0.7493099 0.1484507 -0.8458088 -0.3278646 0.3195509 1.3771322

R is being kind of unhelpful here. I found a fairly long discussion of this that ultimately helped me solve my problem but it goes around the long way to get there. http://faustusnotes.wordpress.com/2012/02/16/problems-with-out-of-sample-prediction-using-r/

The short version is that when we built our model we said we were specifically looking at "data$W", not just "W". So when we ask it to predict based on inputs from data2 it says, "I can't find data$W in here." and then it just stuffs the original predictions for 'data' into predW. That's not very helpful and possibly misleading. However, this can all be solved by giving our model variable names less scope and providing data via the data argument.

> lmfit_new <- lm(W ~ X + Y + Z, data=data) > print(lmfit_new$fitted.values)
1 2 3 4 5 6 7 8 9 10
-0.8562631 1.1639021 1.1048939 0.4355315 0.7493099 0.1484507 -0.8458088 -0.3278646 0.3195509 1.3771322
> predW_new <- predict(lmfit_new, data2) > print(predW_new)
1 2 3 4 5
-1.3766995 -1.8670918 1.1370810 2.8103150 0.6789566

All better. And then we can get the Root Mean Square of the difference between our prediction and our (completely made up) data2 W:

> sqrt(sum((data2$W - predW_new)^2))
[1] 3.655083

statistics

For a while I’ve used JMP for data analysis professionally. Recently we’ve been talking about experiment design and statistical power at work and during some of these discussions I decided it might be good if I knew how to do some R. The learning curve is OK but there’s a lot of kind of magical behavior that I don’t really get yet.

So far I’m working on getting a handle on linear models. JMP has a dialog that is Analyze->Fit Model. It then gives you a nice little browsing interface and lets you build your model with the crosses and nesting and all that. Then you tell it what kind of model you want and what kind of report you’re interested in seeing and let it go. I have a sample dataset that has nothing to do with work that has a response variable “delta”, a couple of continuous variables that effect delta and then a nominal variable “coding” which is essentially, control / experimental. I’ve fit several different models to this data but knowing what I know about how I built the dataset, it makes sense to nest the continuous variables within “coding”. The report it produces has a lot of nicely formatted data and you can run additional tests and reports from within that.

JMP Fit Model Dialog
JMP Fit Model Dialog
JMP Model Fit Report
JMP Model Fit Report

R is a much more programmy kind of tool. It’s possible to get the same model in one line of code.
> lmfit <- lm(data$delta ~ data$coding + data$dt*data$coding + data$dt2*data$coding, read.csv("derp.csv"))
But then you have a result object that you interrogate for information. I'm still struggling with the data structures R presents. The way you index into them to get at specific data really hasn't clicked yet and I find myself fumbling around in the terminal a lot. This is what it looks like when you ask it for the linear model and a summary thereof.
> lmfit
Call:
lm(formula = data$delta ~ data$coding + data$dt * data$coding +
data$dt2 * data$coding, data = read.csv("derp.csv"))

Coefficients:
(Intercept) data$codingb data$dt
2.15264 0.01773 0.75516
data$dt2 data$codingb:data$dt data$codingb:data$dt2
0.51304 1.67854 0.96067

> summary(lmfit)
Call:
lm(formula = data$delta ~ data$coding + data$dt * data$coding +
data$dt2 * data$coding, data = read.csv("derp.csv"))

Residuals:
Min 1Q Median 3Q Max
-2.25889 -0.22361 0.03567 0.39381 2.18111

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.15264 0.37886 5.682 2.23e-06 ***
data$codingb 0.01773 0.55084 0.032 0.97452
data$dt 0.75516 0.21063 3.585 0.00104 **
data$dt2 0.51304 0.20672 2.482 0.01818 *
data$codingb:data$dt 1.67854 0.29369 5.715 2.02e-06 ***
data$codingb:data$dt2 0.96067 0.29090 3.302 0.00226 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.018 on 34 degrees of freedom
Multiple R-squared: 0.9205, Adjusted R-squared: 0.9088
F-statistic: 78.75 on 5 and 34 DF, p-value: < 2.2e-16

It's not as pretty but all of the information is there. Also you can save everything as a script and rerun it if you get more data or a different dataset with the same columns. JMP also supports scripting but I honestly have never used it.

I do find R's form of the fit equation to be easier to understand but either way you have to make sense of the idea that "if experimental use these coefficients, if control use these others":
R:

(Intercept) 2.15264
data$codingb 0.01773
data$dt 0.75516
data$dt2 0.51304
data$codingb:data$dt 1.67854
data$codingb:data$dt2 0.96067

vs
JMP:

5.476 + Match( :coding, "a", (:dt - 1.3) * 0.755, "b", (:dt - 1.3) * 2.434)
+ Match( :coding, "a", (:dt2 - 1.25) * 0.513, "b", (:dt2 - 1.25) * 1.474)
+ Match( :coding, "a", -1.700, "b", 1.700, . )

wind

It’s the weekend before the MS and what am I doing? I’m sitting inside working. Why would that be? I should be out riding my bike for training. When I woke up at 7:30 this morning, the wind was howling around the house and when I looked at the weather it said 20-30mph wind gusting to 35mph. The two most painful bicycle experiences I’ve had have been in wind like that and I don’t really feel the need to subject myself to that again. Tomorrow it’s supposed to be about the same except also raining.

I guess if I’m going to get anything done to prepare for next weekend it’s going to have to be on the rowing machine. I think I’ll be fine for the event though. Especially if the wind is anything like it is today. If I have a 20mph tailwind next weekend it will be a complete piece of cake. If I have a 20mph headwind I’m going to have to draft a car or something because there is no way I’m capable of doing 100 miles into this.

I am getting some decent work done though and the “Tairora Cherry” is pretty fantastic so at least the day isn’t wasted.

spring


I guess it’s spring. The weather was surprisingly awesome this weekend. Highs in the low 80’s, almost no wind, cloudy and cool Saturday morning and then clear. I’ve been riding my bike more to prepare for the MS150 in April and the nice weather was a welcome change. I rode 100.5 miles over the weekend. Just under 68 miles on Saturday starting from home, up Reagan to 29, down into town all the way to the office and then back home. Then today just over 32 miles from home to Parmer, out to 3405 and back. I ran into Rusty doing his training out that way as well. I have a little sun burn just at the cuff where my shorts were from Saturday because I didn’t quite get enough sunscreen there but other than that I’ve survived and I also ate all the things so that’s nice. This evening, while cooking dinner, I noticed that my cherry tree is blooming. I’m pretty surprised because this was the most pathetic winter ever but we’ve been getting rain and I guess it wants water more than it cares about the supposed 1400 hours below 40 degrees it’s supposed to need to make flowers. The maple also looks good and it has a ton of the little seeds with sails on it too which is cool. The rest of the yard is a wreck but that’s to be expected after last year’s 9 month summer. Hopefully we’ll keep getting rain and we won’t have to worry about the entire state being on fire again this year. Fingers crossed.

Universal Studios

Pictures from our visit to Universal Studios.

Eileen Dad and T-Rex
Eileen Wes and T-Rex
Jurassic park atrium
Hogsmeade walls
Hogwart's
Welcome to Hogsmeade
Three Brooms decorations
Three Brooms in Hogsmeade
Lunch in Hogsmeade
Hogwart's again
Hogsmeade
Hogwart's Express
Hogsmeade and Hogwart's