Domanda di colloquio di Exponential AI

How does logistic regression work and what is its cost function?