July 2017
Beginner to intermediate
420 pages
10h 56m
English
I recommend that you get down and dirty with this stuff. Try different orders of polynomials. Go back up to where we ran the polyfit() function and try different values there besides 4. You can use 1, and that would go back to a linear regression, or you could try some really high amount like 8, and maybe you'll start to see overfitting. So see what effect that has. You're going to want to change that. For example, let's go to a third-degree polynomial.
x = np.array(pageSpeeds)y = np.array(purchaseAmount) p4 = np.poly1d(np.polyfit(x, y, 3))
Just keep hitting run to go through each step and you can see the it's effect as...
Our third-degree polynomial is definitely not as good a fit as the fourth-degree ...
Read now
Unlock full access