# What kind of machine learning can predict a probability rather than classification?

For example, I want to predict a probability of whether raining tomorrow, and I can't get the prob. of cloudy or sunny...etc day.

I only get events(attributes of weather) like temperature, humidity, sunny interval, rainy interval...etc.

Train data:
temp. -> 80F
humidity -> 30%
sunny interval -> 5hr
rainy interval -> 0hr

Label: prob. of rainy tomorrow is 20%

Test data example:
temp. -> 90F
humidity -> 10%
sunny interval -> 10hr
rainy interval -> 0hr


I only can get the prob. of rainy day, so I can't use classification algo.

Like above, I want to predict the prob. of rainy tomorrow. I'm not a professional in ML knowledge. I survey many sources and thought the most possible algorithm of ML maybe is regression!?(Cuz it can give me a value like linear regression).

But I don't know is there any other algorithms can help me to predict a probability(also can say I want to predict a value)?

## 2 Answers

Most of the classification algorithms can return a probability or a similar measure.

Usually, you don't get black or white, but nuances of grey, and then based on a threshold, you select one or the other answer.

• I try to not use classification algo because I only can get prob. of rainy day. Oct 25, 2018 at 10:08
• And at the same time, you get the probability of sunny days. Probabilities sum to 1. Oct 25, 2018 at 10:09
• But weather can be cloudy or storm day...etc Oct 25, 2018 at 10:10
• But that's one of your inputs, you want a probability of rain. Oct 25, 2018 at 10:12
• I can't get prob. of cloudy or stormy, only get attributes of weather like temperature, sunny time...etc Oct 25, 2018 at 10:21

Actually, you have it in your keywords already. Look for regression models instead of classification models.

And even then, in most classification models, the last step is often to take the most likely class (with a probability) as the class. Look into the inner workings of the algorithm if you have a successful one. Likely one of the final intermediary results contains the probabilities you look for.

• If I have so many days as train data, and every prob. of everyday will be all different. If I use classification algo, the number of classes will be very large(cuz each prob. is different, and prob. will be regarded as a class for classifying). Maybe I need to use regression to get a value. Oct 25, 2018 at 9:59