General Concepts
Machine Learning
Unsupervised Learning
Interview questions on Unsupervised Learning.
98 questions
General Concepts
Q2. Name some scenarios where we can use unsupervised learning algorithms?
Clustering
Q3. What do you mean by clustering?
Clustering
Q4. What is the main difference between clustering and PCA?
Clustering
Q5. What is the role of the $K$ in K-means?
Clustering
Q6. What are the advantages of K-means clustering?
Clustering
Q7. K-means clustering:
- How would you choose the value of k?
- If the labels are known, how would you evaluate the performance of your k-means clustering algorithm?
- How would you do it if the labels aren’t known?
- Given the following dataset, can you predict how K-means clustering works on it? Explain.

Clustering
Q8. What are the limitations of K-means clustering?
Clustering
Q9. How do you initialize the centroids in K-means?
Clustering
Q10. Why is it important to run the K-means algorithm multiple times with different initial cluster assignments, and how is the best solution selected?
Clustering
Q11. What does within-cluster variation depicts?
Clustering
Q12. What is the convergence criteria in K-means?
Clustering
Q13. What is Silhouette score, and How do we calculate it?
Clustering
Q14. What are some applications of K-means clustering?
Clustering
Q15. Can K-means handle categorical data?
Clustering
Q16. How do you evaluate the quality of K-means clusters?
Clustering
Q17. k-means and GMM are both powerful clustering algorithms.
- Compare the two.
- When would you choose one over another?
Clustering
Q18. What are the key parameters in DBSCAN, and what do they represent?
Clustering
Q19. What is the difference between core points, border points, and noise points in DBSCAN?
Clustering
Q20. How does DBSCAN handle clusters of different shapes?
Clustering
Q21. What are the advantages of using DBSCAN over other clustering algorithms, such as K-means?
Dimensionality Reduction
Q22. Why do we need dimensionality reduction?
Dimensionality Reduction
Q23. List down the two main approaches for dimensionality reduction?
Dimensionality Reduction
Q24. What are some linear techniques of dimensionality reduction?
Dimensionality Reduction
Q25. What is the benefit of using linear methods for dimensionality reduction?
Dimensionality Reduction
Q26. What is the benefit of using linear methods for dimensionality reduction? (Part 2)
Dimensionality Reduction
Q27. What are the drawbacks of using linear methods for dimensionality reduction?
Dimensionality Reduction
Q28. What are the benefits of using nonlinear methods in dimensionality reduction?
Dimensionality Reduction
Q29. What are some non-linear techniques of dimensionality reduction?
Dimensionality Reduction
Q30. Eigen decomposition is a common factorization technique used for dimensionality reduction. Is the eigen decomposition of a matrix always unique?
Dimensionality Reduction
Q31. Name some applications of eigenvalues and eigenvectors.
Dimensionality Reduction
Q32. We want to do PCA on a dataset of multiple features in different ranges. For example, one is in the range $0-1$ and one is in the range $10 - 1000$. Will PCA work on this dataset?
Dimensionality Reduction
Q33. Under what conditions can one apply eigen decomposition? What about SVD?
- What is the relationship between SVD and eigen decomposition?
- What’s the relationship between PCA and SVD?
Dimensionality Reduction
Q34. How does $t-SNE$ (T-distributed Stochastic Neighbor Embedding) work? Why do we need it?
Dimensionality Reduction
Q35. Is it good to use PCA as a feature selection method?
Dimensionality Reduction
Q36. Is PCA a linear model or non-linear model?
Dimensionality Reduction
Q37. What is the importance of eigenvalues and eigenvectors in PCA?
Dimensionality Reduction
Q38. How do you decide the number of principal components to retain in PCA?
Dimensionality Reduction
Q39. What is the difference between PCA and Linear Discriminant Analysis (LDA)?
Dimensionality Reduction
Q40. What are the limitations of PCA?
Dimensionality Reduction
Q41. Explain the concept of whitening in PCA.
Recommendation Engines
Q42. Given this directed graph.

- Construct its adjacency matrix.
- How would this matrix change if the graph is now undirected?
- What can you say about the adjacency matrices of two isomorphic graphs?
Recommendation Engines
Q43. What is a recommendation system?
Recommendation Engines
Q44. What is the importance of recommendation system?
Recommendation Engines
Q45. Define Items, Queries and Embedding in context of recommendation system?
Recommendation Engines
Q46. What are the main components of a recommendation system?
Recommendation Engines
Q47. What is candidate generation in a recommendation system, and what are the main approaches to accomplish it?
Recommendation Engines
Q48. How do content-based and collaborative filtering methods utilize embedding spaces to represent items and queries?
Recommendation Engines
Q49. Define similarity measures in context of recommendation system?
Recommendation Engines
Q50. What are different methods to measure degree of similarity?
Recommendation Engines
Q51. How should one choose the appropriate similarity metric for candidate generation in recommendation systems?
Recommendation Engines
Q52. How can we utilize content-based filtering in the candidate generation process?
Recommendation Engines
Q53. State the advantages and disadvantages of content-based filtering?
Recommendation Engines
Q54. What is the cold start problem in recommendation systems, and how can you address it?
Recommendation Engines
Q55. State explicit and implicit feedback with examples?
Recommendation Engines
Q56. How does collaborative filtering work?
Recommendation Engines
Q57. What are the advantages and disadvantages of collaborative filtering?
Recommendation Engines
Q58. How can user and item embeddings be learned using matrix factorization in collaborative filtering?
Recommendation Engines
Q59. What is the issue with learning embeddings using matrix factorization?
Recommendation Engines
Q60. How can we use Deep Neural Network model for recommendation?
Recommendation Engines
Q61. What is the benefit of using matrix factorization to learn embeddings over softmax DNN?
Recommendation Engines
Q62. What is the benefit of using softmax DNN over matrix factorization for learning embeddings?
Recommendation Engines
Q63. What strategies can be employed to efficiently compute the nearest neighbors in the embedding space of a recommendation system, and how do they work?
Recommendation Engines
Q64. Why should we avoid using candidate generators to rank items in a recommendation system, and what are the benefits of separating candidate generation from the ranking process?
Recommendation Engines
Q65. How does the choice of scoring function affects the ranking of items and quality of recommendations?
Recommendation Engines
Q66. What is the benefit of re-ranking in recommendation system?
Recommendation Engines
Q67. Imagine we build a user-item collaborative filtering system to recommend to each user items similar to the items they’ve bought before.
- You can build either a user-item matrix or an item-item matrix. What are the pros and cons of each approach?
- How would you handle a new user who hasn’t made any purchases in the past?
Autoencoders
Q68. What is an autoencoder?
Autoencoders
Q69. Is an autoencoder example of semi-supervised or self-supervised learning?
Autoencoders
Q70. Why do we need autoencoders?
Autoencoders
Q71. What is the expression of a linear autoencoder? Is it similar to PCA?
Autoencoders
Q72. What are the common loss functions used in training autoencoders?
Autoencoders
Q73. Can backpropagation be used to train autoencoders?
Autoencoders
Q74. What is the bottleneck layer in autoencoders, and what is its significance?
Autoencoders
Q75. Should the encoder and decoder have the same size in an autoencoder? Which one is typically deeper?
Autoencoders
Q76. What issues might arise if the decoder is deeper than the encoder in an autoencoder?
Autoencoders
Q77. What is the benefit of using tied weights in autoencoder model?
Autoencoders
Q78. What is an undercomplete and overcomplete autoencoders?
Autoencoders
Q79. Why are overcomplete autoencoders less commonly used in practice?
Autoencoders
Q80. Why do we need to regularize the autoencoders?
Autoencoders
Q81. What are different ways to regularize autoencoders?
Autoencoders
Q82. What do you mean by deep/stacked autoencoders?
Autoencoders
Q83. Why do we need sparsity in autoencoders?
Autoencoders
Q84. In sparse encoders do we regularize weights or activations of the network?
Autoencoders
Q85. How can we introduce sparsity constraint in autoencoders?
Autoencoders
Q86. What is denoising method in autoencoders?
Autoencoders
Q87. What are the benefits of denoising encoders?
Autoencoders
Q88. Define Contractive Autoencoders?
Autoencoders
Q89. What is the loss function in contractive autoencoders?
Autoencoders
Q90. State the difference between contractive autoencoders and denoising autoencoders.
Autoencoders
Q91. Is Variational Autoencoder(VAE) kind of Stochastic Autoencoders?
Autoencoders
Q92. State the difference between standard autoencoders and variational autoencoder(VAE)?
Autoencoders
Q93. What reconstruction function do we use in stochastic autoencoders?
Autoencoders
Q94. What is reparameterization trick in VAE?
Autoencoders
Q95. Why do we need reparameterization trick in VAE?
Autoencoders
Q96. What loss function we use in Variational Autoencoder(VAE)?
Autoencoders
Q97. How can we use autoencoders for classification task?
Autoencoders