title: Proximity Matrix - Random Forest , R
body: <p>I am using the randomForest package in R, which allows to calculate the proximity matrix (P). In the description of the package it describes the parameter as: "<em>if proximity=TRUE when randomForest is called, a matrix of proximity measures among the input (based on the frequency that pairs of data points are in the same terminal nodes).</em>"</p>
  
  <p>I obtain the proximity matrix of a random forest as follows:</p>
  
  <pre><code>P &lt;- randomForest(x, y, ntree = 1000, proximity=TRUE)$proximity
  </code></pre>
  
  <p>When I investigate the P matrix, I see values like P(i,j)=0.971014493 where i and j are two data instances within my training data set (x). Such a value does not make sense, because when it is multplied by 1000 (number of trees in the forest), the resulting number is not an integer, hence "frequency". Could someone please help me understand, why do I get such real numbers in the proximity matrix? </p>