diff --git a/man/anonymise.Rd b/man/anonymise.Rd new file mode 100644 index 0000000000000000000000000000000000000000..d6ed8946f289aa4f9254943c3fd45223055605fb --- /dev/null +++ b/man/anonymise.Rd @@ -0,0 +1,37 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{anonymise} +\alias{anonymise} +\alias{anonymise.vocaldia} +\alias{anonymise.default} +\title{anonymise: anonymise a vocalisation diagram} +\usage{ +anonymise(vd) + +\method{anonymise}{vocaldia}(vd) + +\method{anonymise}{default}(vd) +} +\arguments{ +\item{vd}{a vocalisation diagram (vocaldia object)} +} +\value{ +a new vocaldia with speaker names replaced by variables + \eqn{s_1,...,s_n} s.t. \eqn{s_1} is the speaker who spoke the least + and \eqn{s_n} the one who did the most talking. +} +\description{ +Anonymise a vocalisation diagram +} +\details{ +"anonymise" a \code{vocaldia} turn taking probability matrix by +replacing speaker names by variables \eqn{s_1,...,s_n$ s.t. $s_1} is +the speaker who spoke the least and \eqn{s_n} the one who did the most +talking. +} +\examples{ +data(vocdia) +x2 <- getSampledVocalMatrix(subset(atddia, id=='Abbott_Maddock_01'), + individual=TRUE, nodecolumn='speaker') +anonymise(x2) +} diff --git a/man/atddia.Rd b/man/atddia.Rd new file mode 100644 index 0000000000000000000000000000000000000000..9f192476998c978aa55ee241926984ce599a25ae --- /dev/null +++ b/man/atddia.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\docType{data} +\name{atddia} +\alias{atddia} +\title{A sample Medical Team Meeting dialogue encoded as a vocaldia} +\format{A data frame with 7869 rows and 7 variables: +\describe{ + \item{id}{The dialogue indentifier} + \item{begin}{The start time of a speech turn or silence interval} + \item{end}{The end time of a speech turn or silence interval} + \item{speaker}{An identifier for the speaker of the turn, or Floor for silence.} + \item{role}{The speaker's role (patient, interviewer, other, or Floor} + \item{trans}{The transcription of the turn (blanked out for anonymity)} + \item{dx}{The diagnosis (ad or nonad} + }} +\source{ +This dataset was generated from the Carolina Conversations + Collection, and used in the work described in De La Fuente, + Albert and Luz: + "Detecting cognitive decline through dialogue processing", + 2017. For the full data set, please contact the Medical + University of South Carolina (MUSC) + http://carolinaconversations.musc.edu/ +} +\usage{ +atddia +} +\description{ +A dataset containing 38 dialogues (17 control patients, and 21 AD +patients) and 7869 vocalisation events. +} +\keyword{datasets} diff --git a/man/getEntropy.Rd b/man/getEntropy.Rd new file mode 100644 index 0000000000000000000000000000000000000000..98a0f450f185500870131a331327427d5f61432d --- /dev/null +++ b/man/getEntropy.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{getEntropy} +\alias{getEntropy} +\title{getEntropy: safely return the Shannon entropy of a distribution.} +\usage{ +getEntropy(distribution) +} +\arguments{ +\item{distribution}{a probability distribution.} +} +\value{ +a numeric value. +} +\description{ +Compute the entropy of a distribution. +} +\details{ +Compute the entropy of a distribution. +} diff --git a/man/getPauseType.Rd b/man/getPauseType.Rd new file mode 100644 index 0000000000000000000000000000000000000000..b7345f38964f7051fcc777eff95d10b3bf17a883 --- /dev/null +++ b/man/getPauseType.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{getPauseType} +\alias{getPauseType} +\title{getPauseType: name pause type between two vocalisation events.} +\usage{ +getPauseType(prevspeaker, nextspeaker) +} +\arguments{ +\item{prevspeaker}{speaker of the vocalisation immediately before Floor} + +\item{nextspeaker}{speaker of the vocalisation immediately after Floor} +} +\value{ +the pause type. +} +\description{ +Identify the type of pause between vocalisations. +} +\details{ +The type of pause a 'Floor' (silence) event represents can be: +'Pause', 'SwitchingPause', 'GrpPause', or 'GrpSwitchingPause'. See +(Luz, 2013) for details. +} +\examples{ +getPauseType('a', 'b') + ## [1] "SwitchingPause" +getPauseType('a', 'Grp') + ## [1] "SwitchingPause" +getPauseType('Grp', 'Grp') + ## [1] "GrpPause" +getPauseType('Grp', 'a') + ## [1] "GrpSwitchingPause" +getPauseType('a', 'a') + ##[1] "Pause" +} +\seealso{ +\code{\link{namePauses}} +} diff --git a/man/getPofAgivenB.Rd b/man/getPofAgivenB.Rd new file mode 100644 index 0000000000000000000000000000000000000000..9b39356462880becae780743ac88b21ada8ec7cd --- /dev/null +++ b/man/getPofAgivenB.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{getPofAgivenB} +\alias{getPofAgivenB} +\title{getPofAgivenB: transtion probability.} +\usage{ +getPofAgivenB(a, b, ttarray) +} +\arguments{ +\item{a}{target node} + +\item{b}{source node} + +\item{ttarray}{adjacency matrix} +} +\value{ +a transition probability. +} +\description{ +Conditional (transition ) probability +} +\details{ +Retrieve \eqn{p(a|b)}, probability of a transition from b to a in an +adjacency matrix +} diff --git a/man/getSampledVocalCountMatrix.Rd b/man/getSampledVocalCountMatrix.Rd new file mode 100644 index 0000000000000000000000000000000000000000..6ac13d20b763511120694475eb0aea5c6c64064e --- /dev/null +++ b/man/getSampledVocalCountMatrix.Rd @@ -0,0 +1,60 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{getSampledVocalCountMatrix} +\alias{getSampledVocalCountMatrix} +\title{getSampledVocalCountMatrix: generate vocalisation diagrams} +\usage{ +getSampledVocalCountMatrix(cdf, rate = 1, individual = FALSE, + noPauseTypes = FALSE, begin = "begin", end = "end", + nodecolumn = "role") +} +\arguments{ +\item{cdf}{a data frame consisting, minimally, of a column for +vocalisation/pause start times, a column for end times, and a +column identifying the speaker, speaker role or 'Floor' (for +silences).} + +\item{rate}{the rate at which to sample the vocalisation events +(in seconds)} + +\item{individual}{whether to include individual speakers or group +them into a single Vocalisation node} + +\item{noPauseTypes}{if TRUE, ignore distinctions between pauses +(SwitchingPause, GrpSwitchingPause, etc)} + +\item{begin}{the name of the column containing the start time of +the vocalisation event in a row.} + +\item{end}{the name of the column containing the end time of the +vocalisation event in the same row.} + +\item{nodecolumn}{the name of the column containing the node +(speaker) name (e.g. 'speaker', 'role').} +} +\value{ +a vocaldia object, consisting of a vocalisation matrix + (vocmatrix) where cell <m,n> contains the counts of + transitions from node n to node m, and a table of prior + probabilities (stationary distribution) per node. +} +\description{ +Generate a count vocalisation diagram through 'sampling'. +} +\details{ +A vocalisation diagram (vocaldia) is a representation of a +dialogue as a Markov process whose cell <m,n> contains the +transition probability from node n to node m). This function for +'cases' (an identifier for a case or a vector of identifiers +identifying a set of cases) in data frame 'df', obtained by +sampling the timeline every 'rate'-th second (see +getSampledVocalCountMatrix). +} +\examples{ +data(vocdia) +getSampledVocalCountMatrix(subset(atddia, + id=='Abbott_Maddock_01'), nodecolumn='role') +} +\seealso{ +(Luz, 2013) +} diff --git a/man/getSampledVocalMatrix.Rd b/man/getSampledVocalMatrix.Rd new file mode 100644 index 0000000000000000000000000000000000000000..441d4b385b4969cc79be87809e1f60fdbd62dcd3 --- /dev/null +++ b/man/getSampledVocalMatrix.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{getSampledVocalMatrix} +\alias{getSampledVocalMatrix} +\title{getSampledVocalCountMatrix: generate vocalisation diagrams} +\usage{ +getSampledVocalMatrix(df, ...) +} +\arguments{ +\item{df}{a data frame consisting, minimally, of a column for +vocalisation/pause start times, a column for end times, and a +column identifying the speaker, speaker role or 'Floor' (for +silences).} + +\item{...}{general parameter to be passed to +\code{\link{getSampledVocalCountMatrix}}} +} +\value{ +a vocaldia object, consisting of a vocalisation matrix + (vocmatrix) where cell <m,n> contains the transition + probability from node n to node m, and a table of prior + probabilities (stationary distribution) per node. +} +\description{ +Generate a probabilistic vocalisation diagram through 'sampling'. +} +\details{ +A vocalisation diagram (vocaldia) is a representation of a +dialogue as a Markov process whose cell <m,n> contains the +transition probability from node n to node m). +} +\examples{ +data(vocdia) +getSampledVocalMatrix(subset(atddia, + id=='Abbott_Maddock_01'),nodecolumn='speaker', individual=TRUE) +} +\references{ +S. Luz. Automatic identification of experts and performance + prediction in the multimodal math data corpus through analysis + of speech interaction. In \emph{Proceedings of the 15th ACM on + International Conference on Multimodal Interaction, ICMI'13}, + pages 575--582, New York, NY, USA, 2013. ACM. +} +\seealso{ +\code{\link{getSampledVocalCountMatrix}} +} +\author{ +Saturnino Luz \email{luzs@acm.org} +} diff --git a/man/getTurnTakingMatrix.Rd b/man/getTurnTakingMatrix.Rd new file mode 100644 index 0000000000000000000000000000000000000000..d19ff2175acb140e662fca119341d9d04b8d4da0 --- /dev/null +++ b/man/getTurnTakingMatrix.Rd @@ -0,0 +1,62 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{getTurnTakingMatrix} +\alias{getTurnTakingMatrix} +\title{getSampledVocalCountMatrix: generate vocalisation diagrams} +\usage{ +getTurnTakingMatrix(df, begin = "begin", end = "end", nodecolumn = "role", + individual = FALSE, noPauseTypes = FALSE) +} +\arguments{ +\item{df}{a data frame consisting, minimally, of a column for +vocalisation/pause start times, a column for end times, and a +column identifying the speaker, speaker role or 'Floor' (for +silences).} + +\item{begin}{the name of the column containing the start time of +the vocalisation event in a row.} + +\item{end}{the name of the column containing the end time of the +vocalisation event in the same row.} + +\item{nodecolumn}{the name of the column containing the node +(speaker) name (e.g. 'speaker', 'role').} + +\item{individual}{whether to include individual speakers or group +them into a single Vocalisation node} + +\item{noPauseTypes}{if TRUE, ignore distinctions between pauses +(SwitchingPause, GrpSwitchingPause, etc)} +} +\value{ +a vocaldia object, consisting of a vocalisation matrix + (vocmatrix) where cell <m,n> contains the counts of + transitions from node n to node m, and a table of absolute + durations of vocalisation events. +} +\description{ +Generate a vocalisation diagram with absolute vocalisation durations. +} +\details{ +A vocalisation diagram (vocaldia) is a representation of a +dialogue as a Markov process whose cell <m,n> contains the +transition probability from node n to node m). Unlike +\code{\link{getSampledVocalCountMatrix}} this function +accummulates event durations directly, therefore resulting in no +self-transitions (in general). +} +\examples{ +x <- subset(atddia, id=='Abbott_Maddock_01') +getTurnTakingMatrix(x) +getTurnTakingMatrix(x, individual=TRUE) +} +\references{ +S. Luz. Automatic identification of experts and performance + prediction in the multimodal math data corpus through analysis + of speech interaction. In \emph{Proceedings of the 15th ACM on + International Conference on Multimodal Interaction, ICMI'13}, + pages 575--582, New York, NY, USA, 2013. ACM. +} +\seealso{ +(Luz, 2013) and \code{\link{getTurnTakingMatrix}}. +} diff --git a/man/getTurnTakingProbMatrix.Rd b/man/getTurnTakingProbMatrix.Rd new file mode 100644 index 0000000000000000000000000000000000000000..005660af3b811ff95fbf1f1eea9784f9139633fe --- /dev/null +++ b/man/getTurnTakingProbMatrix.Rd @@ -0,0 +1,54 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{getTurnTakingProbMatrix} +\alias{getTurnTakingProbMatrix} +\title{getTurnTakingProbMatrix: create a vocaldia from a + data.frame.} +\usage{ +getTurnTakingProbMatrix(df, individual = FALSE, ...) +} +\arguments{ +\item{df}{a data frame consisting, minimally, of a column for +vocalisation/pause start times, a column for end times, and a +column identifying the speaker, speaker role or 'Floor' (for +silences).} + +\item{individual}{whether to include individual speakers or group +them into a single Vocalisation node} + +\item{...}{other parameters to be passed to +\code{\link{getTurnTakingMatrix}}.} +} +\value{ +a vocaldia object, consisting of a vocalisation matrix + (vocmatrix) where cell \eqn{(m,n)} contains the probabilities \eqn{P(n|m)} + transitions to node \eqn{n} from node \eqn{m}, and a table of prior + probabilities (stationary distribution) per node. +} +\description{ +Convert a data frame into a vocalisation diagram using counts rather than sampling. +} +\details{ +Unlike \code{\link{getSampledVocalMatrix}}, this function is based +on transition counts rather than sampled intervals. As a result, +where in this version self transitions will always be set to 0 +(since a vocalisation by a speaker is never followed by another +vocalisation by the same speaker) in the sampled version self +transitons will usually dominate the distribution, since the +speaker who is speaking now is very likely to be the one who were +speaking one second ago. +} +\examples{ +x <- subset(atddia, id=='Abbott_Maddock_01') +getTurnTakingProbMatrix(x) +getTurnTakingProbMatrix(x, individual=TRUE) +} +\seealso{ +(Luz, 2013) and \code{\link{getTurnTakingMatrix}}. + + S. Luz. Automatic identification of experts and performance + prediction in the multimodal math data corpus through analysis + of speech interaction. In \emph{Proceedings of the 15th ACM on + International Conference on Multimodal Interaction, ICMI'13}, + pages 575--582, New York, NY, USA, 2013. ACM. +} diff --git a/man/getTurnType.Rd b/man/getTurnType.Rd new file mode 100644 index 0000000000000000000000000000000000000000..77d8c3d288f347216c4f663c7a76212979130a64 --- /dev/null +++ b/man/getTurnType.Rd @@ -0,0 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{getTurnType} +\alias{getTurnType} +\title{getTurnType: return type of turn} +\usage{ +getTurnType(df, i, individual = FALSE, nodecolumn = "speaker", + noPauseTypes = F) +} +\arguments{ +\item{df}{a data frame consisting, minimally, of a column for +vocalisation/pause start times, a column for end times, and a +column identifying the speaker, speaker role or 'Floor' (for +silences).} + +\item{i}{the identifier (index number) whose type will be returned} + +\item{individual}{if TRUE, return the identifier, a Pause or Grp} + +\item{nodecolumn}{the name of the column containing the node +(speaker) name (e.g. 'speaker', 'role').} + +\item{noPauseTypes}{if TRUE, ignore distinctions between pauses +(SwitchingPause, GrpSwitchingPause, etc)} +} +\value{ +a string containing the turn type or identifier. +} +\description{ +Identify turn types +} +\details{ +Return one of {Vocalisation, GrpVocalisation, ...} or identifier. +} +\examples{ +data(vocdia) +atddia[1:10,] +getTurnType(atddia, 3, nodecolumn='role') ## a vocalisation +getTurnType(atddia, 4, nodecolumn='role') ## a pause +} diff --git a/man/identifyGrpVocalisations.Rd b/man/identifyGrpVocalisations.Rd new file mode 100644 index 0000000000000000000000000000000000000000..2cf27567886b78442d3f484fc5934353bad2b129 --- /dev/null +++ b/man/identifyGrpVocalisations.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{identifyGrpVocalisations} +\alias{identifyGrpVocalisations} +\title{identifyGrpVocalisations: replace appropriate vocalisation + types} +\usage{ +identifyGrpVocalisations(vocvector) +} +\arguments{ +\item{vocvector}{a character vector containing a sequence of +vocalisation events} +} +\value{ +A vector with all events replaced by the appropriate type + identifier. +} +\description{ +Identify group vocalisations +} +\details{ +Standardise identifier for group vocalisations +} +\examples{ +data(vocdia) +identifyGrpVocalisations(atddia$speaker[1:60]) +} diff --git a/man/identifyPauses.Rd b/man/identifyPauses.Rd new file mode 100644 index 0000000000000000000000000000000000000000..1dc1ab94bfc0c2556b51adcf84d183d9db00742d --- /dev/null +++ b/man/identifyPauses.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{identifyPauses} +\alias{identifyPauses} +\title{identifyPauses: label pauses according to type.} +\usage{ +identifyPauses(vocvector) +} +\arguments{ +\item{vocvector}{a character vector containing a sequence of +vocalisation events} +} +\value{ +A vector with all Floor events replaced by the appropriate + pause type identifier. +} +\description{ +Assign types to the pauses (Floor events) in a sequence +} +\details{ +Identify the pauses in a vector as one of the pauses in +\code{pauseTypes} +} +\examples{ +data(vocdia) +identifyPauses(atddia$speaker[1:60]) +} diff --git a/man/identifyVocalisations.Rd b/man/identifyVocalisations.Rd new file mode 100644 index 0000000000000000000000000000000000000000..87e303876f42d1ecb7aa5953018f6d1d1e0c588c --- /dev/null +++ b/man/identifyVocalisations.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{identifyVocalisations} +\alias{identifyVocalisations} +\title{identifyVocalisations: replace appropriate vocalisation + types} +\usage{ +identifyVocalisations(vocvector, idswitchvoc = T) +} +\arguments{ +\item{vocvector}{a character vector containing a sequence of +vocalisation events} + +\item{idswitchvoc}{if TRUE distinguise between +SwitchingVocalisation and Vocalisation.} +} +\value{ +A vector with all events replaced by the appropriate type + identifier. +} +\description{ +Identify switching vocalisations +} +\details{ +SwitchingVocalisation is a vocalisation that signals a immediate +speaker transition; that is, a transition from speaker to +speaker (as opposed to speaker to Grp or speaker to Pause). + +E.g (speakers A, B, C): +\preformatted{ +AAAAAAAABBBBBBBCCCCCBBBBBPauseBBBBSwitchingPauseAAAAAGrpVocalisation + ^ ^ ^ ^ ^ ^ + | | | | | | + | | | ---------------- Non-SwitchingVocalisation's + | | | + ---------------------> SwitchingVocalisation's +} +} +\examples{ +data(vocdia) +identifyVocalisations(atddia$speaker[1:60]) +} diff --git a/man/igraph.vocaldia.Rd b/man/igraph.vocaldia.Rd new file mode 100644 index 0000000000000000000000000000000000000000..0f31590f450429ad8ae3dfffb456d41ac3be2260 --- /dev/null +++ b/man/igraph.vocaldia.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{igraph.vocaldia} +\alias{igraph.vocaldia} +\title{igraph.vocaldia: Create an igraph vocalisation diagram} +\usage{ +igraph.vocaldia(vd, ...) +} +\arguments{ +\item{vd}{a vocalisation diagram} + +\item{...}{arguments for the layout algorithm} +} +\value{ +an igraph +} +\description{ +Create an igraph vocalisation diagram +} +\details{ +Create a vocalisation diagram +} +\examples{ +data(vocdia) +igraph.vocaldia(getSampledVocalMatrix(subset(atddia, id=='Abbott_Maddock_01'), + individual=TRUE, nodecolumn='speaker')) +} diff --git a/man/matrixExp.Rd b/man/matrixExp.Rd new file mode 100644 index 0000000000000000000000000000000000000000..6bb8171e5e6d6aa7b12184da5069a158aab41a55 --- /dev/null +++ b/man/matrixExp.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{matrixExp} +\alias{matrixExp} +\title{matrixExp: raise matrix to exp.} +\usage{ +matrixExp(matrix, exp, mmatrix = matrix) +} +\arguments{ +\item{matrix}{a matrix} + +\item{exp}{the power to which matrix will be raised} + +\item{mmatrix}{a placeholder.} +} +\value{ +matrix^exp +} +\description{ +Matrix exponentials +} +\details{ +A (sort of) exponential function for matrix multiplication (to be +used with \code{\link{staticMatrix}}). +} +\examples{ +data(vocdia) +matrixExp(vocmatrix$ttarray, 3) +} diff --git a/man/namePauses.Rd b/man/namePauses.Rd new file mode 100644 index 0000000000000000000000000000000000000000..cc0b38489a6326939487b74d1d5e1f7e14c23e2e --- /dev/null +++ b/man/namePauses.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{namePauses} +\alias{namePauses} +\title{namePauses: name pause types.} +\usage{ +namePauses(df, nodecolumn = "role") +} +\arguments{ +\item{df}{a data frame consisting, minimally, of a column for +vocalisation/pause start times, a column for end times, and a +column identifying the speaker, speaker role or 'Floor' (for +silences).} + +\item{nodecolumn}{the name of the column containing the node +(speaker) name (e.g. 'speaker', 'role').} +} +\value{ +a data.frame with pauses in nodecolumn replaced by different pause types. +} +\description{ +Replace identified pause pause types in data frame. +} +\details{ +replace all 'Floor' speakers in df by 'Pause', 'SwitchingPause' +etc, and return a new data fame containing pause types in place of +'Floor' (see markov.R, identifyPauses() for a better +implementation) +} +\examples{ +data(vocdia) +x <- subset(atddia, id=='Abbott_Maddock_01') +x[1:15,1:6] +namePauses(x)[1:15,1:6] +} +\seealso{ +\code{\link{identifyPauses}} for a better implementation +} diff --git a/man/plot.matrixseries.Rd b/man/plot.matrixseries.Rd new file mode 100644 index 0000000000000000000000000000000000000000..b4e0b481279b8632f5e30fc591022db679d3c0fa --- /dev/null +++ b/man/plot.matrixseries.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{plot.matrixseries} +\alias{plot.matrixseries} +\title{plotConvergence: plots Markov diagram convergence.} +\usage{ +\method{plot}{matrixseries}(x, ..., par = list(), interact = F) +} +\arguments{ +\item{x}{an object of class matrixseries; a list where the +\eqn{i^{th}} element corresponds to \eqn{M^i}.} + +\item{...}{extra graphics parameters for plot.} + +\item{par}{graphic parameters alist} + +\item{interact}{if TRUE, pauses the drawing after each node.} +} +\value{ +the matrixseries +} +\description{ +Visualise convergence properties of vocalisation graphs +} +\details{ +A 'toy' for visualisation of convergence properties of +vocalisation graphs. Plot the convergence paths of each +Vocalisation event (i.e. each row-column transition probability, +grouped by colour according to the inciding node) +} +\examples{ +data(vocdia) +plot(staticMatrix(vocmatrix$ttarray, digits=4, history=TRUE)) +} diff --git a/man/plot.vocaldia.Rd b/man/plot.vocaldia.Rd new file mode 100644 index 0000000000000000000000000000000000000000..ad47186af254c7f1b1ce829e50c005964a6093ad --- /dev/null +++ b/man/plot.vocaldia.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{plot.vocaldia} +\alias{plot.vocaldia} +\title{plot.vocaldia} +\usage{ +\method{plot}{vocaldia}(x, ..., package = "igraph") +} +\arguments{ +\item{x}{a vocalisation diagram} + +\item{...}{arguments for the layout algorithm} + +\item{package}{the package to be used for ploting (igraph +(default) or Rgraphviz)} +} +\value{ +\code{NULL} +} +\description{ +Plot a vocalisation diagram +} +\details{ +Plot a vocalisation diagram +} +\examples{ +data(vocdia) +require('igraph') +plot(getSampledVocalMatrix(subset(atddia, id=='Abbott_Maddock_01'), + individual=TRUE, nodecolumn='speaker')) +} diff --git a/man/printARFFfile.Rd b/man/printARFFfile.Rd new file mode 100644 index 0000000000000000000000000000000000000000..56ca8f211da6b9900020f5e490d8863f90920827 --- /dev/null +++ b/man/printARFFfile.Rd @@ -0,0 +1,62 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\name{printARFFfile} +\alias{printARFFfile} +\title{printARFFfile: Create arff files by creating and flattening vocaldias} +\usage{ +printARFFfile(df, ids = c(), idcolumn = "id", noPauseTypes = F, + sampled = 0, individual = TRUE, nodecolumn = "role", + classcolumn = "dx", file = "/tmp/ccc.arff") +} +\arguments{ +\item{df}{df a data frame consisting, minimally, of a column for +vocalisation/pause start times, a column for end times, and a +column identifying the speaker, speaker role or 'Floor' (for +silences).} + +\item{ids}{Ids of dialogues to generate (as defined in column named idcolumn)} + +\item{idcolumn}{the name of the column containing the dialogue id} + +\item{noPauseTypes}{if TRUE, ignore distinctions between pauses +(SwitchingPause, GrpSwitchingPause, etc)} + +\item{sampled}{if >0 use \code{\link{getSampledVocalMatrix}} with rate=sampled} + +\item{individual}{whether to include individual speakers or group +them into a single Vocalisation node} + +\item{nodecolumn}{the name of the column containing the node +(speaker) name (e.g. 'speaker', 'role').} + +\item{classcolumn}{the name of the column containing the target class (or value).} + +\item{file}{name of ARFF file to be generated.} +} +\description{ +Generate ARFF files from vocalisation diagrams +} +\details{ +Use this function to generate turn-taking diragrams in ARFF format for +} +\examples{ +data(vocdia) +printARFFfile(atddia, individual=TRUE, classcolumn='dx', + file='/tmp/test.arff', noPauseTypes=FALSE) +library("foreign") +x1 <- read.arff('/tmp/test.arff') +x1[1:3,] +## remove empty columns +x1[,c(unlist(apply(x1[1:(ncol(x1)-1)],2,sum)!=0), TRUE)] +} +\references{ +S. Luz. Automatic identification of experts and performance + prediction in the multimodal math data corpus through analysis + of speech interaction. In \emph{Proceedings of the 15th ACM on + International Conference on Multimodal Interaction, ICMI'13}, + pages 575--582, New York, NY, USA, 2013. ACM. +} +\seealso{ +\code{\link{getSampledVocalCountMatrix}}, + \code{\link{getTurnTakingProbMatrix}}. +} diff --git a/man/startmatrix.Rd b/man/startmatrix.Rd new file mode 100644 index 0000000000000000000000000000000000000000..8fec5f1a724612b4432c73598718cde4c4a54a59 --- /dev/null +++ b/man/startmatrix.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{startmatrix} +\alias{startmatrix} +\alias{startmatrix.default} +\alias{startmatrix.matrixseries} +\title{startmatrix: return the first matrix of a converging series.} +\usage{ +startmatrix(mseries) + +\method{startmatrix}{default}(mseries) + +\method{startmatrix}{matrixseries}(mseries) +} +\arguments{ +\item{mseries}{a matrixseries object} +} +\value{ +the initial matrix. +} +\description{ +Access initital matrix in a \code{matrixseries} +} +\details{ +Access initital matrix in a \code{matrixseries} +} +\examples{ +data(vocdia) +x2 <- staticMatrix(vocmatrix$ttarray, digits=4, history=TRUE) +## original matrix + startmatrix(x2) +} diff --git a/man/staticMatrix.Rd b/man/staticMatrix.Rd new file mode 100644 index 0000000000000000000000000000000000000000..d53d0e8ba317eb5a34e08a7016831b7c4bae3a11 --- /dev/null +++ b/man/staticMatrix.Rd @@ -0,0 +1,54 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{staticMatrix} +\alias{staticMatrix} +\title{staticMatrix Iterate until transition probabilities converge (or give up).} +\usage{ +staticMatrix(matrix, limit = 1000, digits = 4, history = F) +} +\arguments{ +\item{matrix}{an adjecency matrix of trnasition probabilities} + +\item{limit}{maximum number of iterations until we give up on +convergence} + +\item{digits}{the number of decimal places to compare} + +\item{history}{if TRUE, keep track of all matrix products} +} +\value{ +a matrixseries object; that is, a list where each element + is either the initial matrix or the product of the two + preceding matrices +} +\description{ +Compute the stationary distribution for a Markov diagram +} +\details{ +Return static matrix (i.e. the stationary distribution) for the +Markov process represented by the given adjacency matrix. In the +particular case of vocaldia's, each column should roughly +correspond to the amount of time a speaker held the floor for). +Of course, not all Markov chains converge, an example being: +\preformatted{ + 1 + /----->-------\ + A B + \----<--------/ + 1 + +which gives + +. | 0 1 | | 0x0+1x1 0x1+1x0| | 1 0 | +. M = | 1 0 | and M^2 = | 1x0+0x1 1x1+1x0| = | 0 1 | + +} +} +\examples{ +data(vocdia) +x2 <- staticMatrix(vocmatrix$ttarray, digits=4, history=TRUE) +## original matrix +round(x2[[1]],3) +## stationary matrix (M^139) +round(x2[[length(x2)]],3) +} diff --git a/man/toDotNotation.Rd b/man/toDotNotation.Rd new file mode 100644 index 0000000000000000000000000000000000000000..c21731e1dc569cd9d49b8333e88440ed4ade38cd --- /dev/null +++ b/man/toDotNotation.Rd @@ -0,0 +1,44 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{toDotNotation} +\alias{toDotNotation} +\title{toDotNotation: conver vocaldia to graphviz dot notation} +\usage{ +toDotNotation(vd, individual = T, varsizenode = T, shape = "circle", + fontsize = 16, rankdir = "LR", nodeattribs = "fixedsize=true;", + comment = "") +} +\arguments{ +\item{vd}{a vocalisation diagram} + +\item{individual}{if TRUE write individual node names} + +\item{varsizenode}{if true set varsizenode in dot} + +\item{shape}{node shape} + +\item{fontsize}{font size} + +\item{rankdir}{direction of ranking (LR, RF etc)} + +\item{nodeattribs}{attributes for node} + +\item{comment}{comments} +} +\value{ +character data containing the diagram in dot format. +} +\description{ +Create vocalisation diagram to file in dot (graphviz) notation +} +\details{ +Create a vocalisation diagram in dot notation +} +\examples{ +data(vocdia) +toDotNotation(getSampledVocalMatrix(subset(atddia, id=='Abbott_Maddock_01'), + individual=TRUE, nodecolumn='speaker')) +} +\seealso{ +graphviz manual +} diff --git a/man/vocmatrix.Rd b/man/vocmatrix.Rd new file mode 100644 index 0000000000000000000000000000000000000000..f76611d2d19563b408322846ba4d90ff02c67166 --- /dev/null +++ b/man/vocmatrix.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vocalgraphs.R +\docType{data} +\name{vocmatrix} +\alias{vocmatrix} +\title{A sample vocalisation matrix} +\format{A list containing 2 arrayes +\describe{ + \item{ttarray}{The vocaldia adjacency matrix} + \item{tdarray}{The proportional durations (stationary probabilities) of each event (node)} +}} +\source{ +This dataset was generated from the Multomodal Leatrning + Analytics dataset, for the eponymous ICMI'13 Grand + Challenge. The use these vocaldias were put to is described in + Luz (2013). The full dataset and code is available + at https://gitlab.scss.tcd.ie/saturnino.luz/icmi-mla-challenge +} +\usage{ +vocmatrix +} +\description{ +A \code{vocaldia} object containing a 3-speaker dialogue +} +\references{ +S. Luz. Automatic identification of experts and performance + prediction in the multimodal math data corpus through analysis + of speech interaction. In \emph{Proceedings of the 15th ACM on + International Conference on Multimodal Interaction, ICMI'13}, + pages 575--582, New York, NY, USA, 2013. ACM. +} +\keyword{datasets} diff --git a/man/write.vocaldia.Rd b/man/write.vocaldia.Rd new file mode 100644 index 0000000000000000000000000000000000000000..131875eb487aeb63206a6ac69dbab2ee9dc1f0ef --- /dev/null +++ b/man/write.vocaldia.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/markov.R +\name{write.vocaldia} +\alias{write.vocaldia} +\title{write.vocaldia} +\usage{ +write.vocaldia(vd, file = "", ...) +} +\arguments{ +\item{vd}{a vocalisation diagram} + +\item{file}{name of file to which dot diagram will be written.} + +\item{...}{arguments passed on to toDotNotation. If "", write to STDOUT.} +} +\value{ +\code{NULL} +} +\description{ +Write vocalisation diagram to file in dot (graphviz) notation +} +\details{ +Write a vocalisation diagram +} +\examples{ +data(vocdia) +write.vocaldia(getSampledVocalMatrix(subset(atddia, id=='Abbott_Maddock_01'), + individual=TRUE, nodecolumn='speaker'), + file='/tmp/vocdia.dot') +}