DistributionSPL

The smoothed power-law (SPL) distribution for the information-based framework that is described in the original paper.

Unlike for DFR, the natural logarithm is used, as it is faster to compute and the original paper does not express any preference to a specific base. WARNING: this model currently returns infinite scores for very small tf values and negative scores for very large tf values

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun explain(stats: BasicStats, tfn: Double, lambda: Double): Explanation

Explains the score. Returns the name of the model only, since both tfn and lambda are explained elsewhere.

Link copied to clipboard
open override fun score(stats: BasicStats, tfn: Double, lambda: Double): Double

Computes the score.

Link copied to clipboard
open override fun toString(): String

Subclasses must override this method to return the name of the distribution.