I get that the author is writing for a certain audience, but this is a gross over-simplification.
Linear Regression
21–30 of 71 posts
Re: Linear Regression
#22I would prefer an introduction via the Moore-Penrose Pseudo-Inverse. It's a lot easier, imho
Re: Linear Regression
#23If you enjoy these kinds of explanations, "Data Science from Scratch" by Joel Grus explains many machine learning algorithms and has you implement simple versions of them in Python as you read along. It also covers linear regression and I wonder if that book is where the author got the idea for this series of blogposts. Kudos anyway. Something of a nitpick, but one thing that both Simon Ward-Jones and Joel Grus miss…
https://github.com/melling/data-science-from-scratch-swift
Of the last 5, only the Linear Regression chapter is finished:
https://github.com/melling/data-science-from-scratch-swift/b...
Re: Linear Regression
#24> Regression is any algorithm that takes a collection of inputs and predicts an output. I get that the author is writing for a certain audience, but this is a gross over-simplification.
You may say it's only regression if it fits your favorite framework, like giving confidence values or goodness of fit etc, but that's not true in general. There so many variants, like Bayesian probabilistic regression, nonparametrics, neural nets, random forests etc.
Re: Linear Regression
#25I consider myself above average intelligence, but my math skills are sorely lacking (didn't make it beyond pre-calculus). The first section was simple to follow but I was completely lost as soon as he hit the "Nitty Gritty." Any advice on what I need to learn to even begin to understand what's written in section 2?
Re: Linear Regression
#26[1] https://en.wikipedia.org/wiki/Ordinary_least_squares#Matrix/...
Re: Linear Regression
#27Re: Linear Regression
#28Re: Linear Regression
#29I consider myself above average intelligence, but my math skills are sorely lacking (didn't make it beyond pre-calculus). The first section was simple to follow but I was completely lost as soon as he hit the "Nitty Gritty." Any advice on what I need to learn to even begin to understand what's written in section 2?
The intro video for linear regression of one variable is free (I think the whole course is free) and gives a good taste of what's in the course:
https://www.coursera.org/lecture/machine-learning/model-repr...
Re: Linear Regression
#30This article had a brutal leap from being aimed at someone with barely any understanding of maths (complete with friendly emojis) to use of cost functions (without any explanation) and associated code. It's bit like the "how to draw an owl" meme. A good article on linear regression, in my opinion, would break it down into three steps: 1. Spend a bit of time looking at cost functions. In principle linear regression is…
haha - I love the use of the word brutal here! It is a brutal leap. I wanted to give the ideas in the simplest way with friendly emojis and then go onto the more complex derivation with the cost function etc. I haven't explained the idea of the cost function enough. I think your idea for stating with the cost function (as a concept - not a formula) and absolute error may have been nicer to be fair. I can see a nice d…
You use gradient descent, but do not introduce the normal equations. This is problematic for at least two reasons.
Case 1: Design matrix has full rank
Omitting the normal equations obfuscates what is really going on. You are inverting a matrix to solve the first order condition of a strictly convex objective, which therefore has a unique optimum.
Case 2: Design matrix does not have full rank
Omitting the normal equations hides the fact that there are multiple solutions to the first order condition. Gradient descent will find one of them, but you need a principled method for selecting among them. The Moore-Penrose pseudo-inverse method gives you the solution with the smallest L2 norm.
Omitting these details is setting learners up for failure.