Learn R Programming

BlockwiseRankTest (version 0.1.0)

BRISE_Rank: Rank Induction within- and cross-pattern similarity blocks

Description

Compute row-wise ranks of a similarity matrix for two cases:

  • method = "row": within-pattern block (Sii) (square). Because self-pairs exist, the diagonal (self-similarity) is first forced below the minimum entry of (S) so that self-neighbors are always ranked last and thus excluded when top-(k) truncation is applied downstream.

  • method = "rowij": cross-pattern block (Sij) (rectangular, i!=j). There are no self-pairs, so no diagonal adjustment is needed.

Ranks are computed row-wise with rank() and then shifted by 1 (i.e., the function returns rank - 1).

Usage

BRISE_Rank(S, method = "row")

Value

A numeric matrix with the same dimensions as S containing row-wise ranks minus one.

Arguments

S

Numeric similarity matrix: (Sii) (square) when method = "row"; (Sij) (rectangular) when method = "rowij". Larger values indicate greater similarity.

method

Character, either "row" (within-pattern (Sii), diagonal suppressed) or "rowij" (cross-pattern (Sij), no diagonal to suppress).