View source: R/assess_reverse_dependencies.R
metric_score.pkg_metric_reverse_dependencies | R Documentation |
Score a package for the number of reverse dependencies it has; regularized
Convert the number of reverse dependencies length(x)
into a validation
score [0,1]
1 / (1 + exp(-0.5 * (sqrt(length(x)) + sqrt(5))))
## S3 method for class 'pkg_metric_reverse_dependencies'
metric_score(x, ...)
x |
a |
... |
additional arguments unused |
The scoring function is the classic logistic curve
1 / (1 + exp(-k(x-x[0]))
with a square root scale for the number of reverse dependencies
x = sqrt(length(x))
, sigmoid midpoint is 5 reverse dependencies, ie. x[0] =
sqrt(5)
, and logistic growth rate of k = 0.5
.
1 / (1 + -0.5 * exp(sqrt(length(x)) - sqrt(5)))
numeric value between 1
(high number of reverse dependencies) and
0
(low number of reverse dependencies)
## Not run: metric_score(assess_reverse_dependencies(pkg_ref("riskmetric")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.