Adapted from the course book: Tree Models, Neural Networks, Gradient Descent
George Mason University
| Variable | Description | Values |
|---|---|---|
carat |
Weight of the diamond | Numeric |
cut |
Quality of the cut | Fair, Good, Very Good, Premium, Ideal |
color |
Color of the diamond | J, I, H, G, F, E, D |
clarity |
Clarity of the diamond | I1, SI2, SI1, VS2, VS1, VVS2, VVS1, IF |
price |
Price in US dollars | Numeric |
depth, table, x, y, zmedv: median value of owner-occupied homes in $1000s. lstat: lower status of the population percentdis: weighted mean of distances to five Boston employment centresmedv on dis and lstatIncNodePurity): total decrease in loss (residual sum of squares) due to splits over a predictor, averaged over all trees%IncMSE): permutation importance, the increase in out-of-bag mean squared error when the predictor is permuted, averaged over trees and divided by its standard deviationgbm default rm and lstat, on medv after integrating out the othersiris, Petal.Length, Petal.Width Intercept for batch sizes 5, 15, 30 (dashed line: 27.83), by iteration and by computation (thousands of iterations with batch size 5):
sigmoid = function(x,b,w){
v1 = w*x
v2 = v1 + b
v3 = 1/(1+exp(-v2))
}
x=2, w=3, b=-5| Function calculations | Derivative calculations |
|---|---|
1. v1 = w*x = 6 |
1. dv1 = w = 3 (derivative of v1 with respect to x) |
2. v2 = v1 + b = 1 |
2. dv2 = dv1 = 3 (derivative of v2 with respect to x) |
3. v3 = 1/(1+exp(-v2)) = 0.731 |
3. dv3 = dv2*v3*(1-v3) = 0.590 |
dv1, dv2, dv3 are the derivatives of v1, v2, v3 with respect to , called dual variables| Function calculations | Derivative calculations |
|---|---|
1. v1 = w*x = 6 |
4. dv1 = dv2*dv2dv1 = 0.197; df/dx = dv1*w = 0.590 |
2. v2 = v1 + b = 1 |
3. dv2dv1 = 1; dv2 = dv3*dv3dv2 = 0.197 |
3. v3 = 1/(1+exp(-v2)) = 0.731 |
2. dv3 = dv4 = 1; dv3dv2 = v3*(1-v3) = 0.197 |
4. v4 = v3 |
1. dv4 = 1 |
autograd library, which finds gradients by backpropagation| Method | Key Idea | Update Rule |
|---|---|---|
| SGD | Noisy gradient estimates | |
| Momentum | Accumulate gradient direction | ; |
| Nesterov | Look-ahead gradient | ; |
| AdaGrad | Per-parameter learning rates | Scale by |
| RMSprop | Exponential moving average | Scale by |
| Adam | Momentum + adaptive rates | Combines first and second moment estimates |
AII 600