Skip to content

QualityEvalAlg

Samuel Gomes edited this page Jul 12, 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(player_model_bridge: PlayerModelBridge): void

Members

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

Functions

evaluate(profile: InteractionsProfile, group_player_ids: int[]): decimal

Description

(abstract) Returns a quality of an interactions profile for a given learner.

get_completion_percentage(): decimal

Description

(auxiliary) Returns the completion percentage of a quality evaluation procedure.

Example

quality_eval_alg = KNNRegQualityEvalAlg(player_bridge, 5)
configs_gen_alg = ...
course_adapt = Adaptation(name="Test Adaptation",
                          player_model_bridge=player_bridge,
                          task_model_bridge=task_bridge,
                          configs_gen_alg=configs_gen_alg)

course_adapt.bootstrap(5)
print("\nreturn: "+ str(
    round(quality_eval_alg.evaluate(
        InteractionsProfile({"Focus": 0.3, "Challenge": 0.4}), 
        [1, 2, 5, 8])
        , 2)))
#prints, e.g., return: 0.57

Clone this wiki locally