Skip to content

QualityEvalAlg

Samuel Gomes edited this page Jul 5, 2024 · 4 revisions

QualityEvalAlg

QualityEvalAlg is an abstract base class for the algorithms that evaluate the quality of a group while group formation is performed. Currently, three types of algorithm is supported: group-prediction approaches evaluate the group as a whole (GroupQualityEvalAlg); regression approaches that compute a new learner state based on a profile and derive the quality of the profile for the learner (RegQualityEvalAlg); and tabular approaches that predict the quality of a profile to a learner based on a profile value table (TabQualityEvalAlg).

Note: this class was previously called RegressionAlg and some code versions still consider this name. Besides, consider that it will still suffer deeper refactoring.

Constructor and Attributes

Constructor

+ QualityEvalAlg(playerModelBridge: PlayerModelBridge): void

Attributes

Name: expected type Default value Description
playerModelBridge: PlayerModelBridge - The connector for the player data storage.

Methods

+ isTabular(): bool

Description

A method that informs if the current QualityEvalAlg is tabular.

+ isGroupPredict(): bool

Description

A method that informs if the current QualityEvalAlg is based on group evaluation.

+ predict(profile: InteractionsProfile, playerId: int): decimal

Description

(abstract) A method that returns a quality of a interactions profile for a given learner.

+ groupPredict(groupIds: int[]): decimal

Description

(abstract) A method that returns a quality of a group containing the players with ids in groupIds.

+ getCompPercentage(): decimal

Description

(auxiliary) A method that returns the completion percentage of a quality evaluation procedure.

Example

regressionAlg = KNNRegression(playerBridge, 5)
print(regressionAlg.predict(InteractionsProfile(0.2,0.5,0.6,0.2), 5))
#return: <PlayerStructs.PlayerState object at 0x7fe5452a0b10>

Clone this wiki locally