Back to selected work
02 / Machine learningInteractive explainer

Finding patterns in genomic data.

Representing a sequence is only the beginning. The harder question is whether a model’s performance will hold up outside the data it learned from.

ORIGINEducational machine-learning project
THIS VERSIONProject exploration · preprocessing explainer
TOPICSPython · scikit-learn · k-mers
EXPLORER / DATA REPRESENTATION

From a sequence to features.

Explore the preprocessing step, without a model prediction or benchmark score.

SYNTHETIC SEQUENCE
ACGTACGTGCTACGAT

A window of 3 bases moves one character at a time. Each fragment becomes a feature whose occurrences are counted.

14 windows10 distinct features
ACG
3
CGT
2
TAC
2
CGA
1
CTA
1
GAT
1
GCT
1
GTA
1
GTG
1
TGC
1

Raw counts, without normalization or reverse-complement grouping. This synthetic sequence represents no patient or real dataset.

Educational explorer created for this portfolio. Original project metrics remain unpublished until preprocessing has been reevaluated within the training folds.

01

The problem

Genomic sequences need a numerical representation before a classifier can use them. Counts of short overlapping fragments, called k-mers, provide one possible representation. The project also raises a more important evaluation question: can data preparation accidentally expose information from a held-out fold?

02

How it works

The explorer moves a window across a short synthetic DNA sequence and counts each observed fragment. Changing k changes the vocabulary and number of windows. A real classification pipeline would learn its transformations on the training partition, apply them unchanged to held-out data, and evaluate a fitted model.

01Sequence
02Training-only features
03Classifier
04Held-out evaluation
03

Implementation & ownership

The interactive k-mer counter is a new TypeScript explainer created for this portfolio. It is not the original classifier, exported preprocessing pipeline, or a live inference service. The original notebooks, dataset, model comparison, and contribution breakdown have not been connected; no benchmark result is claimed here.

04

Decisions & tradeoffs

A larger k can capture longer local patterns but increases the potential vocabulary (4ᵏ) and sparsity. Raw counts can also reflect sequence length. Choosing k, normalization, feature selection, and the classifier therefore belongs inside a documented training and validation protocol. A convenient visualization does not replace this evaluation.

05

Evaluation & next steps

The design brief calls for reevaluation because transformations must be fitted within the training partitions. Before publishing model scores, recover the data and notebooks, document class counts and any related samples, construct a leakage-safe pipeline, and compare models under consistent folds and seeds. Include per-class errors and uncertainty alongside aggregate metrics.

06

Sources & reproduction

The sequence displayed here is synthetic and fully visible. Choose k = 2, 3, or 4 to reproduce every count by hand. No patient data, saved model, or original benchmark is included. The documentation below explains the evaluation principles; the original project repository remains to be supplied.

ABOUT THIS VERSION

The original notebooks, trained models, and evaluation artifacts were not included with the design brief. This page separates a working browser explainer from results that still need to be connected.

Next project / 03

What belongs in the same basket?

LET’S CONNECT

Have somethingin mind?

For software development, applied AI, or a conversation about the work — my inbox is open.