🌍 Machine Learning · flashcards
Machine Learning Project: Recommendation System Flashcards
52 question-and-answer cards covering Project: Recommendation System as it is examined in Machine Learning. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.
24 sample cards from the Project: Recommendation System deck
Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.
Define Precision@k and Recall@k for evaluating a top-N recommender.
Precision@k = (relevant items in top $k$) / $k$. Recall@k = (relevant items in top $k$) / (total relevant items). Precision measures list quality; recall measures coverage of relevant items.
What is the RMSE formula used to evaluate rating-prediction recommenders?
$$\text{RMSE} = \sqrt{\frac{1}{N}\sum_{(u,i)}(\hat{r}_{ui} - r_{ui})^{2}}$$ where $N$ is the number of test ratings. Lower is better; it penalizes large errors more heavily than MAE.
What is the MAE formula and how does it differ from RMSE?
$$\text{MAE} = \frac{1}{N}\sum_{(u,i)} |\hat{r}_{ui} - r_{ui}|$$ MAE is the average absolute error and treats all errors linearly, while RMSE squares errors and thus penalizes large deviations more.
What does NDCG measure and why is it useful for recommendations?
Normalized Discounted Cumulative Gain measures ranking quality by rewarding relevant items placed higher in the list, with a logarithmic position discount, then normalizing by the ideal ordering. It is useful because position matters in recommendation lists.
Write the DCG@k formula used in NDCG.
$$\text{DCG@}k = \sum_{i=1}^{k} \frac{2^{rel_i}-1}{\log_2(i+1)}$$ where $rel_i$ is the relevance of the item at rank $i$. NDCG@k = DCG@k / IDCG@k.
Besides accuracy metrics, name three 'beyond-accuracy' evaluation metrics for recommenders.
Coverage (fraction of catalog recommended), diversity (dissimilarity within a list), novelty (how non-obvious/unpopular recommended items are), and serendipity (useful surprise).
Why can't you split recommendation data with a naive random row split the way you might for standard classification?
Random splitting can leak future interactions into the training set and may leave users/items in the test set with no training history. Recommenders often use per-user holdout or temporal (time-based) splits to respect chronology and avoid leakage.
What is a temporal (time-based) train/test split and when is it used?
Interactions are split by time—earlier interactions for training, later ones for testing—so the model is evaluated on predicting future behavior. It is used when temporal dynamics matter and to realistically simulate deployment.
What is a leave-one-out split in recommender evaluation?
For each user, the most recent (or one random) interaction is held out for testing while the rest are used for training. It is common for evaluating top-N ranking where you check if the held-out item appears in the recommended list.
What is the role of a validation set when training a recommender?
A validation set (separate from train and test) is used to tune hyperparameters (latent factor count, regularization, learning rate) and to monitor for overfitting via early stopping, without contaminating the final test evaluation.
What regularized loss function does matrix factorization typically minimize?
$$\min_{P,Q} \sum_{(u,i)\in\mathcal{K}} (r_{ui} - \vec{p}_u \cdot \vec{q}_i)^{2} + \lambda\left(\lVert \vec{p}_u \rVert^{2} + \lVert \vec{q}_i \rVert^{2}\right)$$ where $\mathcal{K}$ is the set of known ratings and $\lambda$ controls regularization.
What are the two common optimization algorithms for training matrix factorization models?
Stochastic Gradient Descent (SGD), which updates factors per observed rating, and Alternating Least Squares (ALS), which fixes one factor matrix and solves the other in closed form, alternating until convergence. ALS parallelizes well for implicit data.
How does regularization parameter $\lambda$ affect the trained model?
$\lambda$ penalizes large latent factor magnitudes. Too small $\to$ overfitting (memorizes training ratings); too large $\to$ underfitting (factors shrink toward zero, losing signal). It is tuned on the validation set.
What does it mean to evaluate the model on the test set, and why must it stay untouched during training?
Evaluating on the held-out test set estimates generalization to unseen interactions. It must never be used for training or hyperparameter tuning, otherwise the metric is optimistically biased and no longer reflects real-world performance.
What are signs that a recommender is overfitting?
Training error keeps decreasing while validation/test error rises; excellent accuracy on seen users/items but poor performance on new data; over-reliance on popular items. Remedies include more regularization, fewer latent factors, and early stopping.
Name three hyperparameters you would fine-tune in a matrix-factorization recommender.
Number of latent factors (rank $k$), regularization strength $\lambda$, learning rate, number of epochs/iterations, and (for implicit ALS) the confidence weighting parameter.
What hyperparameter-search strategies are commonly used to fine-tune recommender models?
Grid search (exhaustive over a defined grid), random search (samples configurations), and Bayesian optimization (models the objective to choose promising configurations efficiently), each evaluated on a validation set.
What does 'preparing the model for production' involve for a recommender?
Serializing/exporting the trained model, precomputing item embeddings or recommendation lists, building efficient retrieval (e.g., approximate nearest neighbor / ANN indexes), defining the serving API, and ensuring latency and scalability meet requirements.
Why are approximate nearest neighbor (ANN) indexes used when serving recommendations at scale?
Exact similarity search over millions of item embeddings is too slow for real-time serving. ANN indexes (e.g., HNSW, FAISS, LSH) retrieve the top similar items in sub-linear time with minimal accuracy loss, meeting latency requirements.
What are common challenges when integrating a recommender with existing production systems?
Matching data schemas and feature pipelines, meeting latency/throughput SLAs, handling real-time vs batch scoring, fitting the API into existing front-end/services, fallback behavior for cold-start, and ensuring consistency between training and serving features (avoiding training-serving skew).
Why is monitoring a deployed recommender necessary, and what is model/data drift?
User preferences and item catalogs change over time, so a static model degrades. Drift is the change in data distribution (data drift) or in the input-output relationship (concept drift) that causes accuracy and business metrics to decline, signaling the need for retraining.
What is the role of A/B testing and online metrics in maintaining a recommender?
A/B tests compare a new model/variant against the current one on live traffic, measuring real business KPIs (CTR, conversion, engagement). They validate that offline improvements translate to real user value before full rollout.
How is user feedback collected and used to improve a recommender after deployment?
Through explicit signals (ratings, likes, thumbs) and implicit signals (clicks, dwell time, purchases, skips). This feedback is logged, fed back into the training data, and used to retrain/update the model, closing the loop for continuous improvement.
What does 'continuous improvement' mean in the lifecycle of a production recommendation system?
An ongoing loop of collecting new interaction data and feedback, periodically retraining or incrementally updating the model, re-evaluating offline and online, A/B testing improvements, and monitoring—so the system adapts to evolving users, items, and trends.
What this deck covers
The Project: Recommendation System deck follows the Machine Learning Project: Recommendation System syllabus — 8 chapters and 18 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 6.5 cards per chapter.
Answers are written to be recallable, not just readable — averaging about 229 characters, which is long enough to carry the reasoning and short enough to say out loud.
A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.
Project: Recommendation System flashcards FAQ
How many Project: Recommendation System flashcards are in this Machine Learning deck?
52 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.
Are these Machine Learning flashcards free?
Yes. The preview here is free to read with no signup, and the full 52-card deck is free inside the Examius app.
What do the Project: Recommendation System cards cover?
They follow the Machine Learning Project: Recommendation System syllabus — 8 chapters and 18 topics — so the questions track what is actually examinable.
How should I use these flashcards?
Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.