Logs and Exponentials for ML
Get comfortable with exponents and logarithms, the quiet workhorses of machine learning formulas
A taste of a lesson
Why do models maximise log likelihood instead of just likelihood? Isn't it the same thing?
They have the same best answer, because log always increases with its input, so whatever maximises one maximises the other. The difference is practical. Likelihood multiplies a probability for every example. Multiply 1,000 probabilities of 0.01 and you get 10 to the power -2000, far too small for a computer to store, so it becomes zero. Taking logs turns the product into a sum: 1,000 times log(0.01), about -4,605, which is easy to store. Check: what is log base 10 of 0.01?
Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.
What you will be able to do
- Apply exponent rules confidently with whole, negative and fractional powers
- Explain e and model exponential growth and decay
- Use logarithm rules and change of base correctly
- Explain why ML works with log probabilities
- Recognise exponentials and logs inside softmax, sigmoid and log loss
Lesson plan
- 1 Exponents from multiplication Build exponent rules from repeated multiplication. Start
- 2 Growth, decay and e Model repeated multiplication and meet e. Start
- 3 Logarithms as undoing Understand logs as the inverse of exponentials. Start
- 4 Log rules Use the product, quotient and power rules. Start
- 5 Logs in machine learning See why models work with log probabilities. Start
- 6 Exponentials in models and data Recognise softmax, sigmoid and log transforms. Start
Try asking
About this tutor
A free beginner tutor that rebuilds exponents and logarithms and shows why they appear all over machine learning. You will review exponent rules, meet the number e, model growth and decay, and understand logarithms as the inverse of exponentials. Then you will see the practical uses: turning products into sums for log likelihoods, avoiding numbers too small for computers, log scales on charts, log transforms for skewed data, and the exponentials inside softmax and sigmoid. Every lesson includes small calculations and a quick check you can do on any calculator.
Reviews
Students can review a tutor after a paid lesson. Nobody has yet.
More like this
Other tutors on the same or nearby topics.