ML-04 - Neural network Flashcards
ML-04-Neural network
Why use ANN over polynomial regression?
For a large number of features, polynomial regression gets too big.
Ex:
1,000 raw features with quadratic features x_I^2 will have ~1,000,000 input features. Scales even worse for cubic+.
ML-04-Neural network
Where is the dendrite(s) located? (See image)
(See image)
ML-04-Neural network
Where is the nucleus located? (See image)
(See image)
ML-04-Neural network
Where is the axon located? (See image)
(See image)
ML-04-Neural network
Where are the input wires located? (See image)
(See image)
ML-04-Neural network
Where is the cell body located? (See image)
(See image)
ML-04-Neural network
Where is the output wire located? (See image)
(See image)
ML-04-Neural network
Where is the node of ranvier located? (See image)
(See image)
ML-04-Neural network
Where is the axon terminal located? (See image)
(See image)
ML-04-Neural network
Where is the myelin sheath located? (See image)
(See image)
ML-04-Neural network
Where is the Scwann cell located? (See image)
(See image)
ML-04-Neural network
What is the difference between a NN and the perceptron?
- Perceptron uses step function
- Perceptron outputs are binary, i.e. in {0, 1}.
- NN can use other activation functions.
- NN outputs are real values, often in [0, 1] or [-1, 1]
ML-04-Neural network
What notation would you use to denote which layer a weight belongs to?
w_3^(1) = first layer, 3rd neuron
This connects input values (layer 1) with the 2nd layer.
(See image)
ML-04-Neural network
What notation would you use to denote the 3rd neuron’s activation in the 2nd layer?
a_3^(2) = first layer, 3rd neuron
(See image)
ML-04-Neural network
Describe what the numbers mean in this picture (See image)
- Red is the layer
- Blue is which neuron in the layer it is or which neuron the weight belongs to.
- Green is which specific weight it is.
ML-04-Neural network
In a neural network, what is “a_1^(2)”?
The activation for the 1st neuron in the 2nd layer, i.e.
a = g(z) = g(W^T * x)
ML-04-Neural network
In a neural network, what is z_1^(2)?
The weighted summation of the inputs for the 1st neuron in the 2nd layer.
z = W^T * x
ML-04-Neural network
What is the difference between cross-entropy and sparse cross-entropy?
- CE uses one-hot coded data.
- SCE uses integer labels.
ML-04-Neural network
Why use sparse cross-entropy loss?
Saves memory and computation when labels are sparse.
ML-04-Neural network
How can you use a neural network for linear regression?`
Single layer network with activation function g(x) = x.
ML-04-Neural network
What’s the requirement for an activation function?
Must be differentiable.
ML-04-Neural network
Should you calculate regularization for the bias term?
No.
ML-04-Neural network
How do you check is backpropagation is correctly implemeted?
Gradient checking.
ML-04-Neural network
What is gradient checking?
Numerically checking if the gradient matches the analytical version. Roughly similar values means it should be okay.
ML-04-Neural network
What’s the formula for gradient checking?
(See image)
ML-04-Neural network
What’s a problem you might face when initializing weights too large?
Exploding gradients problem.
ML-04-Neural network
What’s a problem you might face when initializing weights too small?
Vanishing gradients problem.
ML-04-Neural network
What causes vanishing/exploding gradients?
The recursive nature of backpropagation.
ML-04-Neural network
How does Xavier initialization work?
- Weights: Layer l is normally sampled from mean 0 and variance 1/(n^(l-1)).
- Bias: Zero
ML-04-Neural network
What output activation function would you use for binary classification?
Sigmoid
ML-04-Neural network
What output activation function would you use for multiclass classification?
Softmax
ML-04-Neural network
What output activation function would you use for multi-label classification?
Sigmoid
ML-04-Neural network
What output activation function would you use for regression?
A linear activation function.
ML-04-Neural network
What loss function would you use for binary classification?
Binary cross entropy
ML-04-Neural network
What loss function would you use for multiclass classification?
Categorical cross-entropy
ML-04-Neural network
What loss function would you use for multi-label classification?
Binary cross-entropy
ML-04-Neural network
What loss function would you use for regression?
MSE, MAE ++