newSigmoidQuery

fun newSigmoidQuery(fieldName: String, featureName: String, weight: Float, pivot: Float, exp: Float): Query

Return a new Query that will score documents as weight * S^a / (S^a + pivot^a) where S is the value of the static feature.

Parameters

fieldName

field that stores features

featureName

name of the feature

weight

weight to give to this feature, must be in (0,64]

pivot

feature value that would give a score contribution equal to weight/2, must be in (0, +Infinity)

exp

exponent, higher values make the function grow slower before 'pivot' and faster after 'pivot', must be in (0, +Infinity)

Throws

if w is not in (0,64] or either k or a are not in (0, +Infinity)