class truelearn.models.EventModel(knowledge: ~truelearn.models._knowledge.Knowledge = <factory>, event_time: ~typing.Optional[float] = None)[source]#

Bases: object

A class that models a learning event in TrueLearn algorithm.


>>> from truelearn.models import EventModel, KnowledgeComponent
>>> # construct an empty event model
>>> EventModel()
EventModel(knowledge=Knowledge(knowledge={}), event_time=None)
>>> # construct an event model with given event_time
>>> EventModel(event_time=0.0)
EventModel(knowledge=Knowledge(knowledge={}), event_time=0.0)
>>> # construct an event model with given knowledge
>>> knowledge = Knowledge({1: KnowledgeComponent(mean=0.0, variance=1.0)})
>>> EventModel(knowledge=knowledge)  
EventModel(knowledge=Knowledge(knowledge={1: KnowledgeComponent(mean=0.0, variance=1.0, ...)}), event_time=None)


event_time: Optional[float] = None#

A float that specifies the POSIX timestamp when the event occurs.

knowledge: Knowledge#

A knowledge representation of the educational resources.