# Define temperature by clustering with math operators

I can´t figure out how to cluster the temperature for the weather in 3 optimal cases: hot, mild, cold

My data contains: air temperature(the average daily value), max air temperature(highest daily value), min temperature(lowest daily value) for every day from the year 2014

My first idea was to calculate the average temperature for every month. That I get for January the value 5,7. If the daily temperature in January is higher than 5,7 the temperature would be "hot".

My problem is to define the other cases in a realistic way... Maybe with some mathematical functions, but I could not find something like that. The other point is to use the min and max temperature also for these problem but i can´t figure out how.

• Your question is rather vague. Aug 24, 2015 at 22:18
• Where? The Sahara is different to Siberia.
– Karl
Aug 24, 2015 at 22:33

Is the problem "how to define the thresholds for 'hot', 'mild', and 'cold'?"

If so, you can define them any way you like! These are vague terms and can be used in any number of ways. I would argue that, for weather, the answer is probably more biological and individual preference. In Singapore, the lowest temperature on record is somewhere around 19.5C, so you would probably just say it's always "hot".

However, it seems like you want to do something with your dataset, rather than with common sense? What kind of approach would you like? You could simply find two values, $a$ and $b$ ($b>a$), such that one third of your temperatures are $<a$, one third are between $a$ and $b$, and one third are $>b$. Or make it a quarter, a half and a quarter.

In short, with what you've given us, there is no "right" answer.

Yes that is the question!

It´s the historical dataset from a german weather station. I also think it´s hard to describe, because the data are in the past. So in your opinion I can define my own intervals for the three threshold?

That was my next idea if find a definition of the temperature I would compare it to other values for example windy or humidity to say, if the weather is good or bad, with the logical operators.