Skip to content

Commit

Permalink
hits score code changes. souce values from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bburns632 committed Nov 11, 2024
1 parent cff4610 commit 8027d42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
18 changes: 3 additions & 15 deletions R/GraphClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -368,17 +368,9 @@ DirectedGraph <- R6::R6Class(
)$vector
}

# Hub Score
# HITS Score
, hubScore = function(self){
igraph::hub_score(
graph = self$igraph
, scale = TRUE
)$vector
}

# Authority Score
, authorityScore = function(self){
igraph::authority_score(
igraph::hits_score(
graph = self$igraph
, scale = TRUE
)$vector
Expand Down Expand Up @@ -492,11 +484,7 @@ DirectedGraph <- R6::R6Class(
#' [\href{https://en.wikipedia.org/wiki/PageRank}{Wikipedia}]}
#' \item{\bold{\code{hubScore}}}{hub score from Hyperlink-Induced Topic
#' Search (HITS) algorithm.
#' Calculated by \code{\link[igraph:hub_score]{igraph::hub_score}}.
#' [\href{https://en.wikipedia.org/wiki/HITS_algorithm}{Wikipedia}]}
#' \item{\bold{\code{authorityScore}}}{authority score from
#' Hyperlink-Induced Topic Search (HITS) algorithm.
#' Calculated by \code{\link[igraph:authority_score]{igraph::authority_score}}.
#' Calculated by \code{\link[igraph:hits_score]{igraph::hits_score}}.
#' [\href{https://en.wikipedia.org/wiki/HITS_algorithm}{Wikipedia}]}
#' }
#' @section Graph Measures:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node,type,isExported,outDegree,inDegree,outCloseness,inCloseness,numRecursiveDeps,numRecursiveRevDeps,betweenness,pageRank,hubScore,authorityScore
on_base_pct,function,TRUE,0,0,,,0,0,0,0.120882441825325,0,0
OPS,function,TRUE,2,0,0.75,0.75,3,0,0,0.120882441825325,1,0
slugging_avg,function,TRUE,1,1,1.00,1.0,1,1,0.5,0.172257479601088,1,0.5
at_bats,function,TRUE,0,2,,,0,3,0,0.413720157147174,0,1
batting_avg,function,TRUE,1,1,1.00,1.0,1,1,0.5,0.172257479601088,1,0.5
node,type,isExported,outDegree,inDegree,outCloseness,inCloseness,numRecursiveDeps,numRecursiveRevDeps,betweenness,pageRank,HITScore
on_base_pct,function,TRUE,0,0,,,0,0,0,0.1208824418,5
OPS,function,TRUE,2,0,0.75,0.75,3,0,0,0.1208824418,5
slugging_avg,function,TRUE,1,1,1,1,1,1,0.5,0.1722574796,5
at_bats,function,TRUE,0,2,,,0,3,0,0.4137201571,5
batting_avg,function,TRUE,1,1,1,1,1,1,0.5,0.1722574796,5

0 comments on commit 8027d42

Please sign in to comment.