Machine Learning
This section is a working reference for the machine learning a bioinformatician actually uses on tabular and sequence data: preparing data without leakage, choosing and validating a model, reading its metrics honestly, and squeezing out the last points with ensembling. It focuses on Python, the dominant language for this work, and covers the gradient-boosted trees that win most tabular problems plus the deep learning that takes over on raw sequences.
How to use this section
Section titled “How to use this section”- Python throughout. scikit-learn for the workflow, XGBoost / LightGBM / CatBoost for the models, PyTorch for deep learning.
- Every result is real. All code runs in a container in a companion repository. The numbers and figures come from those runs. A few tools with heavy or conflicting dependencies (AutoML, TabPFN) are marked reference only.
- Each guide teaches the decision. When to use a method, how to avoid the common traps, how to read the output, and where it fails.
Foundations
Section titled “Foundations”ML ConceptsSupervised vs unsupervised, over- and underfitting, the bias-variance tradeoff.
EDA for MLExplore a dataset before modelling: distributions, correlations, leakage checks.
Preprocessing & Data LeakageSplit, scale, encode, and impute inside a Pipeline so the test set stays clean.
Feature EngineeringBuild informative features without leaking the target.
Feature SelectionFilter, wrapper, and model-based selection on high-dimensional data.
Model selection & evaluation
Section titled “Model selection & evaluation”Cross-ValidationEstimate performance honestly with stratified and grouped folds.
Model EvaluationConfusion matrix, ROC-AUC, precision-recall, and picking the right metric.
Algorithms
Section titled “Algorithms”Algorithms OverviewA visual tour of the main model families, with StatQuest videos.
Linear & Logistic RegressionThe baselines every project should start from, with regularization.
Bagging & BoostingRandom forests and gradient boosting, the two great tree ensembles.
XGBoostThe gradient-boosting workhorse, with SHAP interpretation.
LightGBMFast, leaf-wise boosting for larger tabular data.
CatBoostBoosting with native categorical handling.
Ensembling
Section titled “Ensembling”OOF Blending & Hill ClimbingCombine models with out-of-fold predictions and a greedy weight search.
StackingTrain a meta-model on out-of-fold predictions.
End-to-End PipelineThe whole workflow: compare, select, evaluate, interpret.
Deep learning
Section titled “Deep learning”Neural Networks with PyTorchBuild and train a multilayer perceptron on tabular data.
CNNs for SequencesDetect a DNA motif with a convolutional network and read it back out.
AutoML & foundation models
Section titled “AutoML & foundation models”AutoML with AutoGluonA competitive stacked model in one line (reference only).
AutoML with FLAMLFast, cost-aware tuning on a laptop (reference only).
AutoML with auto-sklearnThe canonical Bayesian-search baseline (reference only).
Tabular Deep LearningTabNet, TabTransformer, TabPFN, and TabM (reference only).