Gaussian Naive Bayes is the simplest probabilistic classifier in the FFD pipeline and acts as a fast, interpretable baseline. Given a transaction’s 29 PCA-derived features, GaussianNB estimates the probability that it belongs to Class 1 (fraud) by computing the posterior under Bayes’ theorem, modelling each feature’s class-conditional likelihood as a univariate Gaussian. Despite its strong independence assumption, it is competitive on the PCA-transformed FFD features because PCA explicitly decorrelates the input space.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Antisource/FFD/llms.txt
Use this file to discover all available pages before exploring further.
How Gaussian Naive Bayes Works
Bayes’ theorem relates the posterior probability of fraud to the likelihood and prior:- Speed — parameter estimation is O(n · d); prediction is O(d) per sample.
- No iterative optimisation — fits in a single pass over the training data.
- Calibrated probabilities — outputs can be interpreted directly as fraud probabilities when the Gaussian assumption holds.
Implementation
GaussianNB has no mandatory hyperparameters; the notebook uses all defaults:Key Hyperparameters
| Parameter | Default | Guidance |
|---|---|---|
var_smoothing | 1e-9 | Adds a fraction of the largest feature variance to all feature variances, preventing division by zero for near-constant features. Increase (e.g. 1e-6) if the model is numerically unstable or if some PCA components have very low variance. |
priors | None (estimated from data) | Supply priors=[p_genuine, p_fraud] to override the empirical class frequencies, for example when the training set has been augmented by GAN and no longer reflects real-world fraud rates. |
Evaluation
Why the independence assumption is reasonable here: The V1–V28 features are
the result of Principal Component Analysis (PCA) applied to the original
transaction features. By construction, PCA components are orthogonal and
therefore linearly uncorrelated. Naive Bayes assumes conditional independence
(a stronger claim), but decorrelated features violate this assumption less
severely than correlated raw features would, making GaussianNB a natural fit
for the FFD feature space.
See Also
Training Pipeline
End-to-end pipeline: data loading, GAN augmentation, train/test split, and unified evaluation loop.
Metrics Reference
Definitions of accuracy, precision, recall, and F1 as used across all six FFD classifiers.