KatInterview

PCA, Normalization, and Logistic Regression Fundamentals

Machine LearningModel answer
MediumModel answerMachine Learningdimensionality-reductionpreprocessingoptimization

Last updated

Explain dimensionality reduction, preprocessing choices, backpropagation mechanics, threshold tuning, and domain-constrained modeling in a classification context.

You're building a binary classifier for a tabular dataset and need to explain your technical choices across preprocessing, training, and evaluation.

Answer the following:

  1. PCA and normalization: Describe how principal component analysis reduces dimensions. Explain the difference between feature-wise standardization and sample-wise L2 normalization, and when each preprocessing step is appropriate.

  2. Optimization mechanics: Derive the gradient of logistic regression loss with respect to the weights. Then explain how backpropagation generalizes this to deep networks.

  3. Model selection: What baseline models would you compare, and what criteria matter when choosing between logistic regression and more complex alternatives?

  4. Domain constraints: Define knowledge-informed machine learning and provide a specific example of incorporating domain expertise into model training.

  5. Threshold tuning: Explain how moving the decision threshold affects true positive rate and false positive rate. Can you simultaneously improve both metrics by adjusting the threshold alone?

Structure your answer to show both mathematical understanding and practical judgment.

Hints

Hint 1

Principal components are eigenvectors of the covariance matrix, ranked by variance explained

Hint 2

The logistic gradient simplifies to (prediction − target) × input due to cross-entropy's pairing with sigmoid

Hint 3

Backpropagation applies the chain rule layer-by-layer in reverse, reusing cached forward-pass values

Hint 4

ROC curves trace the TPR-FPR tradeoff as threshold varies; both rates move in the same direction