0

I'm trying to find the best way to classify bivariate point patterns in spatstat according to the relationship between two point species:

Point pattern classification with spatstat: what am I doing wrong?

Point pattern classification with spatstat: how to choose the right bandwidth?

I used @Adrian's suggestion from the first link.

  Cancer <- split(cells)[["tumor"]]
  Immune <- split(cells)[["bcell"]]
  Dimmune <- density(Immune)
  f <- rhohat(Cancer, Dimmune)

f (rhohat) is a "resource selection function" (RSF) which describes the relationship between the intensity of the "Cancer" point process and the covariate (here kernel density of the "Immune"-point pattern). After extracting the values of f I am running a hierarchical clustering or K-means on the values.

f actually contains 5 variables with 512 values each: covariate (here Dimmune), the rho-function itself, variance of the estimator "var", and "lo" and "hi" (Lower and Upper limits of pointwise 95%% confidence interval).

I used either the rho-function alone or all five variables for clustering by putting them in a row like this: enter image description here

I normalized (Z-scaled) all resulting (512*5) variables before clustering. Is it mathematically valid, to use not only rho-function but all five variables for hierarchical clustering / K-means?

In addition, I am wondering whether it is necessary for hierarchical clustering/K-means to use the same range of the covariate. The density range of the covariate of each sample is divided by 512 by default and the rho, var, lo, and hi are calculated for resulting covariate values. The particular covariate values are thus not “homologous” across the samples. If I take e.g. the covariate value number 256, it may happen to be 0.004 in one sample but 0.01 in another sample. May I still use them for my clustering analyses (i.e. use each column as a variable if I put all samples under each other) or do I violate some mathematical rule by doing so?

some examples of the RSF: enter image description here enter image description here

Sergej S
  • 1
  • 1

0 Answers0