% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scoring.R
\name{hybrid_score}
\alias{hybrid_score}
\title{Compute hybrid edge score}
\usage{
hybrid_score(
  edge_metrics,
  w1 = 0.3,
  w2 = 0.7,
  score_type = "multiplicative",
  dcor_rescue_percentile = NULL
)
}
\arguments{
\item{edge_metrics}{A data.frame containing at least \code{EdgeFrequency}
and \code{Stability.dcor.scaled} columns (as returned by
\code{\link[=compute_hybrid_scores]{compute_hybrid_scores()}}).}

\item{w1}{Numeric weight for edge frequency (default 0.3).}

\item{w2}{Numeric weight for dCor stability (default 0.7).}

\item{score_type}{Character; \code{"multiplicative"} (default) or
\code{"additive"}.}

\item{dcor_rescue_percentile}{Numeric between 0 and 1, or \code{NULL}
(default). When set, edges with \code{Stability.dcor.scaled} above
this percentile receive a minimum \code{EdgeFrequency} floor.
Only applies to multiplicative scoring.}
}
\value{
The input data.frame with an added \code{HybridScore} column.
}
\description{
Scores edges by combining MRNET edge frequency with dCor stability.
Two scoring modes are available:
\describe{
\item{\code{"multiplicative"} (default)}{
\deqn{HybridScore = EdgeFrequency^{w1} \times
      Stability.dcor.scaled^{w2}}{HybridScore = EdgeFrequency^w1 *
      Stability.dcor.scaled^w2}
Edges need support from both components; a near-zero value in
either component pulls the score toward zero.}
\item{\code{"additive"}}{
\deqn{HybridScore = w1 \times EdgeFrequency + w2 \times
      Stability.dcor.scaled}{HybridScore = w1 * EdgeFrequency +
      w2 * Stability.dcor.scaled}
Allows edges with strong dCor but weak MRNET frequency (or
vice versa) to retain a meaningful score.}
}
}
\details{
When \code{dcor_rescue_percentile} is set (multiplicative mode only),
edges whose \code{Stability.dcor.scaled} exceeds the given percentile
have their \code{EdgeFrequency} raised to a minimum floor (the 30th
percentile of non-zero EdgeFrequency values). This prevents
near-zero MRNET frequency from suppressing edges that dCor finds
reliably.
}
\examples{
edges <- data.frame(
  source = c("MAG1", "MAG2", "MAG3"),
  target = c("MAG2", "MAG3", "MAG4"),
  EdgeFrequency = c(0.8, 0.5, 0.9),
  Stability.dcor.scaled = c(0.7, 0.3, 0.85)
)
scored <- hybrid_score(edges, w1 = 0.3, w2 = 0.7)
scored$HybridScore

}
