Work out smote sample count instantly with clear inputs, formula shown and shareable results.
SMOTE creates a synthetic minority point by picking a real minority sample, choosing one of its k nearest minority neighbours, and interpolating at a random position on the segment between them. Fully balancing the classes needs majority minus minority new points, and the ratio of synthetic to real points tells you how hard the algorithm is being pushed — above roughly five, generated points start dominating the class.
SMOTE generation
synthetic = majority - minority; synthetic per real point = synthetic / minority; interpolation candidates = minority x k
No. k must be less than the number of minority samples, otherwise there are not enough neighbours to interpolate between and the implementation will error.
Strictly after, and only on the training fold. Generating synthetic points before splitting leaks interpolated information into the test set and inflates the score.