Work out feature count vs sample ratio instantly with clear inputs, formula shown and shareable results.
The ratio of samples to features controls how much a model can overfit. With fewer samples than features a linear model can fit the training data perfectly and generalise not at all, which is why the classical guidance is at least ten observations per predictor and twenty for logistic regression with rare events. Below that, regularisation or dimensionality reduction is not optional.
Sample to feature ratio
ratio = samples / features; recommended samples = features x target ratio
Those problems routinely have far more features than samples and rely on strong regularisation such as L1, or on dimensionality reduction. The ratio then tells you how much regularisation you need, not whether to proceed.
Yes, each level becomes a column. A postcode field can turn one nominal feature into thousands, which is where ratios collapse without you noticing.