in sourcecode/scoring/matrix_factorization/pseudo_raters.py [0:0]
def _make_extreme_raters(self, raterParams: pd.DataFrame, raterIdMap: pd.DataFrame):
"""Populates self.extremeRaters, which is a list of dicts with rater id info"""
# Because LCB is turned off and we therefore don't use not-helpful pseudoratings anymore,
# we only include the min rater intercept (which produces the highest possible note intercept)
# If we were to use not-helpful pseudoratings, we would also include the max rater intercept.
raterInterceptValues = [
raterParams[c.internalRaterInterceptKey].min(),
]
raterFactorValues = [
raterParams[c.internalRaterFactor1Key].min(),
0.0,
raterParams[c.internalRaterFactor1Key].max(),
]
self.extremeRaters = []
i = 0
for raterIntercept in raterInterceptValues:
for raterFactor in raterFactorValues:
# These pseudo-raters need to have IDs that don't conflict with real raterParticipantIds
raterParticipantId = -1 - i
raterIndex = raterIdMap[mf_c.raterIndexKey].max() + 1 + i
self.extremeRaters.append(
{
c.raterParticipantIdKey: raterParticipantId,
mf_c.raterIndexKey: raterIndex,
c.internalRaterInterceptKey: raterIntercept,
c.internalRaterFactor1Key: raterFactor,
}
)
i += 1