Class Imbalance and Dimensionality Reduction Flashcards
What is the advantage of Leaky ReLU?
Allows small negative values to avoid ‘dead neurons’
Leaky ReLU modifies the traditional ReLU to allow a small, non-zero gradient when the unit is not active.
What does the sigmoid function do?
Maps to (0, 1); good for binary classification
The sigmoid function is often used in logistic regression and binary classification tasks.
What is the range of the tanh function?
Maps to (-1, 1)
The tanh function is symmetric around the origin, which can be beneficial for learning.
What is the purpose of optimisers in training?
Update weights to minimise loss
Optimisers adjust the weights of the model to improve performance based on the loss function.
What does SGD stand for?
Simple gradient descent
SGD is a common optimisation algorithm used in machine learning.
What does Adam optimiser combine?
Momentum + RMSprop
Adam is an adaptive learning rate optimisation algorithm that is popular due to its efficiency.
Why is visualising CNNs important?
See what filters are learning, Debug issues, Understand model behaviour
Visualisation helps in interpreting the features learned by convolutional neural networks.
What is one technique for visualising CNNs?
Feature map visualisation
This technique helps in understanding which features are being activated by certain inputs.
Fill in the blank: Data augmentation helps fight overfitting by training on ‘______’ versions of your data.
new
What is class imbalance?
Class imbalance = When one class has way more examples than another.
This can lead to biased model predictions.
What is an example of class imbalance?
Negative samples: 998, Positive samples: 2.
Such a scenario can heavily skew model performance.
What accuracy could a model achieve by always predicting ‘Negative’ in a class imbalance scenario?
99.8% accuracy.
This illustrates how misleading accuracy can be in imbalanced datasets.
Why is class imbalance a problem?
Model ignores the minority class.
This can lead to poor performance in predicting the minority class.
What is the impact of class imbalance on model predictions?
Biased boundaries = Bad predictions.
Class imbalance can result in a model that is biased towards the majority class.
In which areas is class imbalance especially problematic?
Medical diagnoses, Fraud detection, Rare event prediction
These domains often involve critical decisions based on minority classes.
What is Binary Cross-Entropy Loss (BCE)?
L_BCE = - y_i * log(y_i) - (1 - y_i) * log(1 - y_i).
BCE is commonly used for binary classification tasks.
How does class imbalance affect the Binary Cross-Entropy Loss?
Majority class dominates the loss function.
This can lead to suboptimal learning for the minority class.
What metric does the model optimize for in the presence of class imbalance?
Overall accuracy, not fair balance.
This can result in a model that performs well overall but poorly on minority classes.
What is a solution to class imbalance in model training?
Weighted Loss Functions.
These functions adjust the loss to give more importance to the minority class.
What is Weighted Binary Cross Entropy?
Assign higher importance (weight) to the minority class.
This helps to mitigate the effects of class imbalance.
Provide a Keras example for setting class weights.
class_weights = {0: 1.0, 1: 5.0}.
This example assigns a weight of 5 to the minority class.
What is Weighted Categorical Cross Entropy used for?
For multi-class problems.
This is an extension of weighted binary cross-entropy for multiple classes.
What is one strategy for fixing imbalanced data?
Collect more data.
Increasing the number of examples for the minority class can help balance the dataset.
What is oversampling?
Duplicate minority class samples.
This can help to balance the dataset by increasing the representation of the minority class.