For multi-class classification, the output layer should have as many neurons as classes. Softmax activation converts outputs into probabilities that sum to 1.
Macro-averaged F1 score calculates F1 for each class and averages them, giving equal importance to all classes, which is good for imbalanced data.
import numpy as np from scipy.special import softmax logits = np.array([2.0, 1.0, 0.1]) probabilities = softmax(logits) print(probabilities)
The softmax function exponentiates each logit and normalizes by the sum of all exponentials. The output sums to 1 and reflects relative confidence.
Categorical Cross-Entropy is the standard loss for multi-class classification with one-hot encoded labels and softmax output.
Overfitting happens when the model learns training data too well but fails to generalize. Lack of regularization can cause this.
