Person-class: Class '"Person"'

Description Fields Generics Class Methods Author(s) References See Also Examples

Description

Person implements a representation of a learner: persons have names, competences, positions – calculated from the activity traces that are stored about them. Such traces are implemented as so-called Performance.

Fields

name:

The realname of the person (character string).

performances:

Vector with references pointing to the person's performance objects.

positions:

Vector temporarily holding references pointing to positions calculated from selections or all of the performances. May be cleared any time.

activityType:

Character string describing the type of activity (e.g. 'read' or 'write').

scores:

Double holding a grade of the performance (if available) or NULL if not.

timestamps:

Vector holding timestamps for each performance about when it was enacted (character string).

labels:

Vector holding character strings with labels of each performance (e.g. 'text written for exam').

currentDomain:

Reference pointing to a domain object.

logging:

Logical flag indicating on whether the person's performance objects shall internally store the raw source text.

Generics

names

Return character string with the realname of the person.

names<-

Set realname of the person (to given character string).

[

Accessor to the performances (e.g. fridolin[1] returns the first performance).

performances

Return vector with references pointing to the person's performances.

path

Return vector with references pointing to the person's performances, sorted chronologically or by given index positions.

terms

Return list with one entry for each performance containg the terms (as a vector with the character strings of the terms).

competences

Calculate competences held by the person (clustering those performance together that belong together).

position

Calculate the compence position held by the person.

near

Return those persons cared for by a given HumanResoureManager that are in proximity to this person.

proximity

Return cosine proximity value of the person's competence position to another person's position or a performance.

==

Test for identity: return TRUE if two persons are identical (i.e. close above the domain's identity threshold).

cosine

Return the cosine value between the person object and other given objects.

plot

Plot a marker for the person's current competence position.

print

Pretty printing of the object.

show

Display the object by printing its key characteristics.

summary

Print basic descriptive statistics about the data held.

Class Methods

initialize(name, domain):

Constructor: create a new Person object with given name and in a given Domain

perform(txt, purpose, activity, score, when, label):

This method is called from read and write to instantiate a Performance object and fill it with the data handed over.

write(txt, purpose, score, when, label):

This method is used when learners write a text. It instantiates a Performance object and fill it with data (calling perform). The parameters contain the raw text (txt), a human-readable character string for its purpose, if available a score, a character string when holding the timestamp, and a human-readable label to be used when displaying the performance in visualisations. If no label is handed over, the method constructs one. If no timestamp is handed over, it picks the current date and time via Sys.time().

read(txt, performance, purpose, when, label):

This method is used when learners read a text. It instantiates a Performance object and fill it with data (calling perform). The parameters contain the raw text (txt), a human-readable character string for its purpose, a character string when holding the timestamp, and a human-readable label to be used when displaying the performance in visualisations. If no label is handed over, the method constructs one. If no timestamp is handed over, it picks the current date and time via Sys.time().

path(ix, from, to):

Return a vector with references pointing to the persons Performance objects, ordered chronologically or by index ix, possibly restricted to the interval from to to.

position(when):

Return a newly instantiated Performance object for a given time and date via when or up to the current date and time.

lastPosition():

Return the latest competence position occupied by the person. If no position was previously calculated, the current position is calculated and returned. This method thus caches performance positions.

setName(value):

Set the realname of the person (use the generic names<- instead).

getName():

Get the realname of the person (use the generic names instead).

getActivatedTerms(ix):

Returns a list holding the names of the top activated terms in a vector for each performance.

getMeaningVectors(ix):

Returns a matrix with the performances' meaning vectors in the rows.

getSourceTexts():

Return a vector of character strings containing the source texts.

setSourceLogging(x):

Change the setting for source logging: TRUE will make all future performances internally store the raw source text (and not only the meaning vectors).

getPurposes():

Return a vector of character strings containing the purpose labels.

getDomains():

Return a vector of references pointing to the domain each performance resides in.

setCurrentDomain(dom):

Return the current domain the person is active in, that is used by all future performance, read, and write acts.

print():

Pretty printing the object (use the generic print instead).

show():

Display the object by printing its key characteristics (use the generic show instead).

Author(s)

Fridolin Wild <wild@brookes.ac.uk>

References

Fridolin Wild (2016): Learning Analytics in R with SNA, LSA, and MPIA, Springer:Berlin.

See Also

Performance, position, performances, competences, near, names, path, plot, proximity, cosine, identity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dmgr = DomainManager()
data(generic.domain)
dmgr$add(d, title="generic")

ppl = HumanResourceManager(dmgr)

fridolin = ppl$add("fridolin")
fridolin$read("a paper about business management")
fridolin$write("a forum message in the course forum of business management 101")

path(fridolin)

mpia documentation built on May 2, 2019, 4:18 p.m.