How can a Random Forest proximity matrix be used for unsupervised clustering?

Quick Overview

Asks how a random forest proximity matrix can drive clustering when the data has no labels. Tests understanding of how proximities are computed, how to train a forest without a target, which clustering methods accept the result, and where the approach breaks down.

How can a Random Forest proximity matrix be used for unsupervised clustering?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

How can a Random Forest proximity matrix be used for unsupervised clustering? ```hint No labels to split on A forest needs a classification target. Think about what contrast you could create from the data itself so that the forest has to learn how the features depend on each other. ``` ```hint From trees to a distance Count something for each pair of rows across all the trees, then ask which clustering algorithms accept a pairwise matrix instead of feature vectors. ``` ### What a Strong Answer Covers - How the proximity of two samples is defined from a trained forest and turned into a distance. - How to train a forest when there are no labels, and why that construction captures structure in the data. - Which clustering and embedding methods can use the result. - What makes this distance attractive for tabular data, and its costs and failure cases. ### Follow-up Questions - How would you scale this to a few million rows when the full proximity matrix does not fit in memory? - What does an out-of-bag accuracy close to 50% on the real-versus-synthetic task tell you? - Why might you count only trees where both rows were out of bag when computing proximities? - How would you choose the number of clusters with this distance?

Overview: Asks how a random forest proximity matrix can drive clustering when the data has no labels. Tests understanding of how proximities are computed, how to train a forest without a target, which clustering methods accept the result, and where the approach breaks down.

General logo
General
Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

How can a Random Forest proximity matrix be used for unsupervised clustering?

What a Strong Answer Covers Guidance

  • How the proximity of two samples is defined from a trained forest and turned into a distance.
  • How to train a forest when there are no labels, and why that construction captures structure in the data.
  • Which clustering and embedding methods can use the result.
  • What makes this distance attractive for tabular data, and its costs and failure cases.

Follow-up Questions Guidance

  • How would you scale this to a few million rows when the full proximity matrix does not fit in memory?
  • What does an out-of-bag accuracy close to 50% on the real-versus-synthetic task tell you?
  • Why might you count only trees where both rows were out of bag when computing proximities?
  • How would you choose the number of clusters with this distance?