Skip to content

Commit

Permalink
review rOpenSci 2
Browse files Browse the repository at this point in the history
- motivation L2 normalization wireless data
- specify the rho in pk.test cannot be equal 1
  • Loading branch information
giovsaraceno committed Nov 21, 2024
1 parent e94750c commit e496b42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/pk.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ setMethod("pk.test", signature(x = "ANY"),
if(Quantile<=0 | Quantile>1){
stop("Quantile must be in (0,1].")
}
if(!is.numeric(rho) | (rho<=0 | rho>1)){
if(!is.numeric(rho) | (rho<=0 | rho>=1)){
stop("rho must be in (0,1).")
}

Expand Down
4 changes: 3 additions & 1 deletion vignettes/wireless_clustering.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ head(wireless)

The Wireless Indoor Localization data set contains the measurements of the Wi-Fi signal strength in different indoor rooms. It consists of a data frame with 2000 rows and 8 columns. The first 7 variables report the values of the Wi-Fi signal strength received from 7 different Wi-Fi routers in an office location in Pittsburgh (USA). The last column indicates the class labels, from 1 to 4, indicating the different rooms. Notice that, the Wi-Fi signal strength is measured in dBm, decibel milliwatts, which is expressed as a negative value ranging from -100 to 0. In total, we have 500 observations for each room.

Given that Wi-Fi signal strength values are inherently bounded within a certain range, it is possible to consider the spherically transformed data points using $L_2$ normalization. This transformation maps the data onto the surface of a 7-dimensional sphere, ensuring that each observation has a uniform length. By projecting the data onto this high-dimensional sphere, we can take advantage of spherical geometry, and consequently perform the proposed clustering algorithm.
In many wireless applications, the relative signal strengths across routers are more relevant to the underlying spatial patterns and device positioning than the absolute magnitudes. Additionally, absolute signal strength can be affected by noise, device orientation or environmental factors. In this case, it is reasonable to consider the spherically transformed data points using L2 normalization. This transformation maps the data onto the surface of a 6-dimensional sphere, ensuring that each observation has a uniform length.
Given that absolute signal strength is not critical to the research question, the spherical representation provides a meaningful and interpretable framework for studying the data set.
In general, it is appropriate to consider spherically transformed data points when: (i) the absolute length of the measurements is irrelevant or too noisy; (ii) if we are more interested in the relative distributions (or angular relationships) between data points.

We perform the clustering algorithm on the `wireless` data set. We consider the $K= 3, 4, 5$ as possible values for the number of clusters.

Expand Down

0 comments on commit e496b42

Please sign in to comment.