DATA EXPLORATION · LEARNING EXPERIMENT

Financial Ratio Explorer

Synthetic data

24 fictional companies across two years. Clusters describe patterns; they are not tax-risk labels or violation predictions.

Visible companies—
Missing ratio values / year—
PCA variance retained—
Clustering inertia / year—

Company patterns

Selected company

——
Relative distance to annual mean—

A within-year 0–100 scale, not a probability. Scores cannot be compared across years.

Company observations

CompanySectorClusterGross marginReceivables / revenueCash / revenueLiabilities / assetsRelative distance

— means an undefined or missing observed ratio. Median imputation is used only for the model input. Filtering does not refit the model.

Methods & boundaries

Five financial ratios

Gross margin, receivables/revenue, operating cash/revenue, liabilities/assets and expenses/revenue. Missing inputs and zero denominators remain explicit; observed zero values are retained.

Exploratory preprocessing

Annual medians → StandardScaler → KMeans (k = 2/3/4, n_init = 20, seed = 42). PCA projects the same five standardized features to two dimensions; it is a display, not the clustering input.

No predictive validation

All records are synthetic. There are no ground-truth risk labels, held-out predictive tests or a validated best k. Cluster numbers are arbitrary, fitted independently by year, and have no ranking meaning.

This newly authored example draws on financial-analysis learning topics. Source notebooks were reviewed, not reproduced with original business data. scikit-learn 1.7.2 · 48 synthetic records · generator seed 20261013.