Difference between sklearn’s “log_loss” and “LogisticRegression”? I am a newbie currently learning data science from scratch and I have a rather stupid question to ask. I’m currently learning about binary classification, and I understand that the logistic function is a useful tool for this. I looked up the documentation and noticed that there are two logistic related functions I can import, i.e. sklearn.metric.log_loss and sklearn.linear_model.LogisticRegression. When and where should I use them, and what’s the difference?

On a broader note, what’s the difference between a metric and a model, and why is the log loss function a metric? Apologies if this question sounds completely nonsensical, but this is a genuine source of confusion for me!
The metrics module by Scikit-learn implements functions assessing prediction error for specific purposes (Regression, classification, etc.). Model is the algorithm that actually does the classification/regression/clustering (as per need) for you.

Log-loss measures the accuracy of, say a classifier. It is used when the model outputs a probability for each class, rather than just the most likely class.

EDIT: Thanks to @mapto for suggesting documentation reference:


sklearn.metrics.log_loss,
and
sklearn.linear_model.LogisticRegression