org.activemath.studentmodel2
Class LearnerModel

java.lang.Object
  extended by org.activemath.studentmodel2.LearnerModel

public class LearnerModel
extends Object

A Simple Student model that only takes exercise performance in consideration and does some propagation of evidence.


Field Summary
protected static Logger log
           
 
Method Summary
 boolean destroyModel(String userId)
           
 boolean existsModel(String userId)
           
 Map<CognitiveProcess,Integer> getAssessmentDetails(String learnerId, String conceptId)
           
 String getBeliefModelId()
           
 List<String> getContributingConcepts(String itemId)
           
 List<Evidence> getDirectEvidence(String learnerId, String conceptId)
           
 List<Evidence> getIndirectEvidence(String learnerId, String conceptId)
           
static LearnerModel getInstance()
           
 ActivemathEventListener getListener()
           
 int getMastery(String userId)
           
 double getMastery(String userId, Collection<String> conceptIds)
           
 int getMastery(String userId, String conceptId)
           
 int getMastery(String userId, String conceptId, CognitiveProcess cognitiveProcess, CompetencySystem competencySystem)
           
 int getMastery(String userId, String conceptId, Competency competency)
           
 Map<String,Integer> getMasteryComponents(String learnerId, String satelliteId)
           
 AssessmentModel getModel(String userId)
          Get the AssessmentModel for a user
 int getPropagationDepth()
           
 List<String> getUnderlyingExercises(String learnerId, String conceptId)
           
 boolean hasMisconception(String userId, String misconception)
           
 void initModel(String userId)
          Load/create the model for a user.
 boolean isPersistenceEnabled()
           
 boolean isSendBeliefUpdate()
          Should the learner model issue belief update Events?
 boolean isUseUpwardPropagation()
           
 void removeMisconceptions(String userId, List<String> nonMisconceptions)
          Remove Misconceptions of a user
 void setBeliefModelId(String beliefModelId)
           
 void setPersistenceEnabled(boolean enabled)
           
 void setPropagationDepth(int propagationDepth)
           
 void setSendBeliefUpdate(boolean sendBeliefUpdate)
          Should the learner model issue belief update Events?
 void setUseUpwardPropagation(boolean useUpwardPropagation)
           
 void storeModel(String userId)
          Persist the model for a user.
 void tellMisconceptions(String userId, List<String> misconceptions)
          Add misconceptions to the user's model
 void updateAssessment(String userId, String conceptId, Collection<CognitiveProcess> competencies)
          Start an update of Mastery values for a given user/concept/competency triple.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger log
Method Detail

getInstance

public static LearnerModel getInstance()

getListener

public ActivemathEventListener getListener()

getMastery

public int getMastery(String userId)
Parameters:
userId -
Returns:
Average mastery over all concepts for this user

getMastery

public int getMastery(String userId,
                      String conceptId)

getMastery

public double getMastery(String userId,
                         Collection<String> conceptIds)

getMastery

public int getMastery(String userId,
                      String conceptId,
                      Competency competency)

getMastery

public int getMastery(String userId,
                      String conceptId,
                      CognitiveProcess cognitiveProcess,
                      CompetencySystem competencySystem)

initModel

public void initModel(String userId)
Load/create the model for a user.


storeModel

public void storeModel(String userId)
Persist the model for a user. Actual storage might be delayed for a maximum number of seconds.


destroyModel

public boolean destroyModel(String userId)

existsModel

public boolean existsModel(String userId)

tellMisconceptions

public void tellMisconceptions(String userId,
                               List<String> misconceptions)
Add misconceptions to the user's model

Parameters:
userId - - id of the user
misconceptions - - list of conceptions diagnosed by the exercise system

removeMisconceptions

public void removeMisconceptions(String userId,
                                 List<String> nonMisconceptions)
Remove Misconceptions of a user

Parameters:
userId - - id of the user
r - - the exerciseResult

hasMisconception

public boolean hasMisconception(String userId,
                                String misconception)

getModel

public AssessmentModel getModel(String userId)
Get the AssessmentModel for a user

Parameters:
userId - - the ID of the user
Returns:
The AssessmentModel of the user

updateAssessment

public void updateAssessment(String userId,
                             String conceptId,
                             Collection<CognitiveProcess> competencies)
Start an update of Mastery values for a given user/concept/competency triple. (Normally upon availability of new evidence...)

Parameters:
userId - - the user's ID
conceptId - - the concept to be updated
competencies - - List of competencies to be updated

getPropagationDepth

public int getPropagationDepth()
Returns:
the propagationDepth

setPropagationDepth

public void setPropagationDepth(int propagationDepth)
Parameters:
propagationDepth - the propagationDepth to set

getBeliefModelId

public String getBeliefModelId()
Returns:
the beliefModelId

setBeliefModelId

public void setBeliefModelId(String beliefModelId)
Parameters:
beliefModelId - the beliefModelId to set

isUseUpwardPropagation

public boolean isUseUpwardPropagation()
Returns:
the useUpwardPropagation

setUseUpwardPropagation

public void setUseUpwardPropagation(boolean useUpwardPropagation)
Parameters:
useUpwardPropagation - the useUpwardPropagation to set

isSendBeliefUpdate

public boolean isSendBeliefUpdate()
Should the learner model issue belief update Events?

Returns:
the sendBeliefUpdate

setSendBeliefUpdate

public void setSendBeliefUpdate(boolean sendBeliefUpdate)
Should the learner model issue belief update Events?

Parameters:
sendBeliefUpdate - the sendBeliefUpdate to set

isPersistenceEnabled

public boolean isPersistenceEnabled()
Returns:
Whether the learner model loads/saves learner models (uses the persistence model)
See Also:
setPersistenceEnabled(boolean)

setPersistenceEnabled

public void setPersistenceEnabled(boolean enabled)
Parameters:
enabled - Whether to load/save learner models (use persistence model)

getContributingConcepts

public List<String> getContributingConcepts(String itemId)

getUnderlyingExercises

public List<String> getUnderlyingExercises(String learnerId,
                                           String conceptId)

getDirectEvidence

public List<Evidence> getDirectEvidence(String learnerId,
                                        String conceptId)

getIndirectEvidence

public List<Evidence> getIndirectEvidence(String learnerId,
                                          String conceptId)

getMasteryComponents

public Map<String,Integer> getMasteryComponents(String learnerId,
                                                String satelliteId)

getAssessmentDetails

public Map<CognitiveProcess,Integer> getAssessmentDetails(String learnerId,
                                                          String conceptId)