Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8668 bites

Page 51

Data Science & Analytics1 min read

Spark transformations versus actions

Transformations like map and filter are lazy and build a lineage DAG returning a new RDD; actions like count or collect trigger execution and return a value to the driver.

Data Science & Analytics1 min read

Mode collapse in GANs and how to fix it

Mode collapse is the generator producing few similar outputs, missing data diversity to fool the discriminator; fixes include Wasserstein loss, minibatch discrimination, unrolled GANs, and feature…

Data Science & Analytics1 min read

Why Transformers use multi-head attention

A single head averages into one representation subspace; multiple heads attend in parallel to different subspaces, letting the model capture diverse relations like syntax and coreference at once, then…

Data Science & Analytics2 min read

Exploration versus exploitation: epsilon-greedy and UCB

Exploit current best to earn reward, explore to discover better options; epsilon-greedy explores randomly with probability epsilon; UCB explores by an uncertainty bonus…

Data Science & Analytics2 min read

RL components and how Q-learning works

Agent acts on the environment, observes state and reward, seeking to maximize cumulative discounted reward; Q-learning iteratively updates Q(s,a) toward reward plus discounted best…

Data Science & Analytics1 min read

Analyzing skewed revenue-per-user experiments

Heavy tails inflate variance and slow significance, and the mean is dominated by whales; mitigate via winsorization or capping, log transforms, CUPED variance reduction, or bootstrap and rank tests.

Data Science & Analytics1 min read

Interpreting a black-box gradient boosting model

Global tools like permutation importance or aggregated SHAP rank overall feature influence; local tools like per-instance SHAP or LIME explain one prediction; SHAP unifies both via additive…

Data Science & Analytics1 min read

Random Forest versus Gradient Boosting

Random Forest trains deep trees in parallel and averages to cut variance; boosting builds shallow trees sequentially, each correcting prior errors to cut bias, often higher accuracy but…

Data Science & Analytics1 min read

Stemming versus lemmatization in text preprocessing

Stemming chops affixes fast but crudely, yielding non-words; lemmatization maps to real dictionary base forms using POS, slower but accurate; skip both for embedding or transformer models.

Data Science & Analytics1 min read

Handling missing numerical values

Dropping rows is simple but loses data and can bias if missingness is non-random; mean or median imputation keeps rows but shrinks variance and ignores correlations; model-based imputation is…

Data Science & Analytics1 min read

Pandas loc versus iloc indexing

Loc selects by label and is inclusive of both endpoints; iloc selects by integer position and is exclusive of the stop; passing a string label to iloc fails.

Data Science & Analytics1 min read

MLE versus MAP estimation and the role of priors

MLE maximizes likelihood alone; MAP maximizes likelihood times a prior, acting as regularization that shrinks toward prior beliefs; with abundant data they converge.

Data Science & Analytics1 min read

Eigenvalues, eigenvectors, and their role in PCA

An eigenvector keeps direction under a matrix, its eigenvalue scales it; PCA finds eigenvectors of the covariance matrix as principal axes.

Data Science & Analytics2 min read

How gradient descent and the learning rate work

Gradient descent steps downhill along the negative gradient to minimize cost; the learning rate sets step size; too high diverges or oscillates, too low converges painfully slowly.

Data Science & Analytics2 min read

Framing ad-load tradeoffs: revenue versus retention

Define revenue plus guardrail engagement metrics, run a long-enough experiment to see retention effects, and weigh short-term lift against lifetime-value erosion.

Data Science & Analytics2 min read

Does forcing profile completion cause retention?

Name the confounder (engaged users self-select into completing profiles), warn that forcing it may not transfer the effect, and propose a randomized experiment.

Data Science & Analytics2 min read

Python Virtual Environments

A virtual environment is an isolated Python installation with its own packages, so each project gets the exact dependency versions it needs without conflicting with other projects or the system Python.

Data Science & Analytics2 min read

Transformer Architecture

The Transformer replaces recurrence with self-attention, letting every token directly attend to every other token in parallel. This enables long-range context and fast training on GPUs, making it the backbone of modern large language models and much of…

Data Science & Analytics2 min read

Generative Adversarial Network (GAN)

A GAN trains two networks in competition: a generator that fabricates fake samples and a discriminator that judges real versus fake. Their adversarial game pushes the generator toward realistic outputs, enabling image synthesis and data generation without…

CSS & Design Systems2 min read

Multi-theme infrastructure for a component library

Style components against semantic tokens exposed as CSS custom properties, define per-theme token values, and switch at runtime via a data-theme attribute or class.