BasicModel

abstract class BasicModel

This class acts as the base class for the specific basic model implementations in the DFR framework. Basic models compute the informative content Inf1 = -log2Prob1 .

See also

Inheritors

Constructors

Link copied to clipboard
constructor()

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Functions

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

Returns an explanation for the score. Subclasses must override this method.

Link copied to clipboard
abstract fun score(stats: BasicStats, tfn: Double, aeTimes1pTfn: Double): Double

Returns the informative content score combined with the after effect, more specifically informationContentScore * aeTimes1pTfn / (1 + tfn). This function must be non-decreasing with tfn.

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

Subclasses must override this method to return the code of the basic model formula. Refer to the original paper for the list.