Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Machine Learning by (19k points)

I found model.predict and model.predict_proba both give an identical 2D matrix representing probabilities at each category for each row.

What is the difference of the two functions?

1 Answer

0 votes
by (33.1k points)

Predict method:

predict(self, x, batch_size=32, verbose=0)

This function generates output predictions for the input samples, processing the samples in batches.

It will return a NumPy array of predictions.

Predict_proba method:

predict_proba(self, x, batch_size=32, verbose=1)

It generates class probability predictions for the input samples batch by batch.

It also returns a numpy array of probability predictions.

Hope this answer helps.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.2k users

Browse Categories

...