Motivation...
Oftentimes with storms, we can get snow to rain, we get snow to sleet, snow/sleet, to freezing rain, but what determines these precipitation types? So, let's talk a little bit about this. First of all, when you think about the troposphere, which is where the game is played, you're looking at about 40,000 feet. So, we're only going to need about 15,000 feet of that atmosphere to age, grow the snow, and produce these different precipitation types. And sometimes you do not even need all of that. But let's just start up here where the snow crystals are developing, you know, we call this the dendritic growth region. Now it's pretty easy to produce snow when you've got the snowflakes that are already being produced up there, and they fall down through the atmosphere all the way down to the ground as snow because the whole column itself is below 32 degrees Fahrenheit or zero Celsius. And so, what do you wind up with? This beautiful Currier and Ives postcard down here, right? That's easy. But what happens when you start introducing a warm layer?
So, on average, let's play with that warm layer somewhere between 5 and 10,000 feet. Maybe not all of it. So, we've got snow, we've always got snow up there in the winter time, usually at 15,000 feet on up. Ok, so here come those snow crystals rolling on the down the layer. All of a sudden, oh! It goes above 32 degrees, starts to melt, either the entire flake or a little bit of it, but once it starts to fall back into the air that's below 32, it becomes a sleet pellet. So, it completely refreezes again. You can hear the sleet. You can hear it on the rooftops. You can hear it on the street. You can hear it on your car if you're just sitting there. And sleet and snow are typically ok to drive in, but this last precipitation type, ew! Alright, so let's play again with the atmosphere. Go up to 15,000, we've got snow down to 10 on average. It melts, uh oh, it's still melting all the way down to about 2,000 feet and then, on under that air mass, that's just cold enough to refreeze whatever is at the surface, but it's very shallow. Now, this can vary anywhere between 200 and 2,000 feet. But the problem is, you don't get a chance to refreeze that droplet. It comes down as a liquid and whatever it hits it turns to ice. And ice is the worst thing to drive on! Especially if you're going too fast!
[CAR SKIDDING ON ICE]
Yeah, stuff like that can happen. So, the rain keeps coming down in the freezing layer. It accumulates on everything. The rooftops, the tree limbs, and you wind up with some big problems in through here. And unfortunately, too, you've got power lines involved in many, many cases where that ice is accumulating on power lines. Now, between the two poles, if you just take on average, the weight of a quarter inch of ice adds about 500 pounds to those lines! And yeah, that means power loss and all sorts of problems.
So, those are precipitation types and basically, how they form. Obviously, you can get all of the same precipitation in one storm, you can get a combination of all three. But that's essentially how the atmosphere works for precipitation types.
The video above discusses different precipitation types and how they form. Precipitation type is an example of a categorical variable, one in which a finite set of outcomes can occur. Accurately predicting the precipitation type may be more important for a user than the magnitude of the precipitation. For example, you might expect less than an inch of rain, but if that rain is actually freezing rain, hazards can occur such as slippery roads, downed trees, etc., that you must prepare for. Or maybe you are concerned with a certain threshold of freezing rain, such as an amount greater than a ½ inch, which could down power lines. The actual magnitude of the precipitation does not matter as much as the type of precipitation that occurs and/or if the amount surpasses a specific threshold.
Categorical variables, like the ones described in the example above, show up quite frequently in weather and climate analytics. They allow us to create thresholds that focus on a key aspect of weather that is important to the user’s question. Instead of predicting all outcomes (precipitation amount and type), we worry about predicting the outcomes that matter (precipitation type and threshold). Categorical variables require special forecasting methods, which will be highlighted in this lesson. Read on to learn more.
Lesson Objectives
- Select an appropriate categorical forecast method given a user scenario.
- Describe a logistic regression and fit the model to data in R.
- Explain the rules and splits of CART and measure purity.
- Build, terminate, and interpret a tree diagram in R.