Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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!

29.3k questions

30.6k answers

501 comments

104k users

Browse Categories

...