| Type: | Package | 
| Title: | Discovery of Motifs in Spatial-Time Series | 
| Version: | 2.0.2 | 
| Maintainer: | Heraldo Borges <stmotif@eic.cefet-rj.br> | 
| Description: | Allow to identify motifs in spatial-time series. A motif is a previously unknown subsequence of a (spatial) time series with relevant number of occurrences. For this purpose, the Combined Series Approach (CSA) is used. | 
| License: | MIT + file LICENSE | 
| BugReports: | https://github.com/heraldoborges/STMotif/issues | 
| URL: | https://github.com/heraldoborges/STMotif/wiki | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| Imports: | stats, ggplot2, reshape2, scales, grDevices, RColorBrewer | 
| RoxygenNote: | 7.3.1 | 
| Suggests: | knitr, rmarkdown, testthat | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2024-02-22 15:18:04 UTC; heraldoborges | 
| Author: | Heraldo Borges [aut, cre] (CEFET/RJ), Amin Bazaz [aut] (Polytech'Montpellier), Esther Pacciti [aut] (INRIA/Polytech'Montpellier), Eduardo Ogasawara [aut] (CEFET/RJ) | 
| Repository: | CRAN | 
| Date/Publication: | 2024-02-23 19:00:07 UTC | 
CSAMiningProcess
Description
CSA Datamining Process
Usage
CSAMiningProcess(D, DS, w, a, sb, tb, si, ka)
Arguments
D | 
 Dataset containing numeric values  | 
DS | 
 Dataset containing SAX encoded values  | 
w | 
 Word Size  | 
a | 
 Number of letters to do the encode  | 
sb | 
 Spatial block size  | 
tb | 
 Temporal block size  | 
si | 
 Minimum number of occurrences inside each block  | 
ka | 
 Minimum number of spatial-time series with occurrences inside each block  | 
Value
Return a list of ranked motifs. Each motif contains the information [isaxcode, recmatrix, vectst, rank], as described:
isaxcode: Motif sequences in character format
recmatrix: Matrix giving as information the blocks containing this motif
vectst: Coordinate of the start positions of the motif in the original dataset
rank: L of information used for motif ranking, as [dist, word, qtd, proj]
Examples
#CSA Datamining process
D  <- STMotif::example_dataset
DS <- NormSAX(STMotif::example_dataset,5)
rmotif <- CSAMiningProcess(D,DS,4,5,4,10,2,2)
Normalize the data and SAX indexing
Description
Normalize the data and SAX indexing
Usage
NormSAX(D, a)
Arguments
D | 
 Dataset containing numeric values  | 
a | 
 Number of letters use to encode  | 
Value
A normalized and encoded dataset for a given alphabet a
Examples
#Normalization and Sax Dataset
DS <- NormSAX(STMotif::example_dataset, 5)
Rank the STmotifs Rank motifs by their quality
Description
Rank the STmotifs Rank motifs by their quality
Usage
RankSTMotifs(stmotifs)
Arguments
stmotifs | 
 List of identified motifs  | 
Value
The ranked version of the identified list of motifs
Examples
#Search for Spatial-time Motifs
D  <- STMotif::example_dataset
DS <- NormSAX(STMotif::example_dataset,5)
stmotifs <- SearchSTMotifs(D,DS,4,5,4,10,2,2)
rstmotifs <- RankSTMotifs(stmotifs)
Package STMotif
Description
This package 'STSMotifs' allows to identify motifs in spatial-time series. A motif is a previously unknown subsequence of a (spatial) time series with relevant number of occurrences. For this purpose, the Combined Series Approach (CSA) is used.
Details
To have more information about the package : PACKAGE STMOTIF
Adjust a Dataset Adjust the dimensions of a dataset to build the blocks
Description
Adjust a Dataset Adjust the dimensions of a dataset to build the blocks
Usage
STSADatasetAdjust(D, tb, sb)
Arguments
D | 
 Dataset containing numeric values  | 
tb | 
 Temporal block size  | 
sb | 
 Spatial block size  | 
Value
Dataset adjusted to build the blocks.
Examples
#Adjust a block
D <- STSADatasetAdjust(STMotif::example_dataset, 20, 12)
SearchSTMotifs
Description
Search for Spatial-time Motifs
Usage
SearchSTMotifs(D, DS, w, a, sb, tb, si = 3, ka = 3)
Arguments
D | 
 Dataset containing numeric values  | 
DS | 
 Dataset containing SAX encoded values  | 
w | 
 Word Size  | 
a | 
 Number of letters to do the encode  | 
sb | 
 "Space slice" Number of columns in each block  | 
tb | 
 "Time slice" Number of rows in each block  | 
si | 
 Support of Global Occurrence (GO)  | 
ka | 
 Support for Spatial Occurrence (SO)  | 
Value
Return a list of identified motifs. Each motif contains the information [isaxcode, recmatrix, vectst], as described:
isaxcode: Motif sequences in character format
recmatrix: Matrix giving as information the blocks containing this motif
vectst: Coordinate of the start positions of the motif in the original dataset
Examples
#Search for Spatial-time Motifs
D  <- STMotif::example_dataset
DS <- NormSAX(STMotif::example_dataset,5)
stmotifs <- SearchSTMotifs(D,DS,4,5,4,10,2,2)
Plot a heatmap of the dataset and highlight the selected motifs from the list
Description
Plot a heatmap of the dataset and highlight the selected motifs from the list
Usage
display_motifsDataset(dataset, rstmotifs, alpha)
Arguments
dataset | 
 Numerical dataset  | 
rstmotifs | 
 List of ranked motifs  | 
alpha | 
 The cardinality of the SAX alphabet  | 
Value
Heatmap dataset with seelected motifs
Examples
#Launch all the workflow
#Plot the result
D  <- STMotif::example_dataset
DS <- NormSAX(STMotif::example_dataset,5)
stmotifs <- SearchSTMotifs(D,DS,4,5,4,10,2,2)
rstmotifs <- RankSTMotifs(stmotifs)
display_motifsDataset(dataset = STMotif::example_dataset, rstmotifs[c(1:4)],  5)
Plot the selected spatial-time series with the selected motifs highlighted
Description
Plot the selected spatial-time series with the selected motifs highlighted
Usage
display_motifsSTSeries(dataset, rstmotifs, space = c(1:length(dataset)))
Arguments
dataset | 
 Dataset containing numeric values  | 
rstmotifs | 
 List of ranked motifs  | 
space | 
 Select a range of columns to plot the corresponding spatial series  | 
Value
Selected spatial series with the selected motifs highlighted
Examples
#Launch all the workflow
#Plot the result
D  <- STMotif::example_dataset
DS <- NormSAX(STMotif::example_dataset,5)
stmotifs <- SearchSTMotifs(D,DS,4,5,4,10,2,2)
rstmotifs <- RankSTMotifs(stmotifs)
display_motifsSTSeries(dataset = STMotif::example_dataset,rstmotifs[c(1:4)],space = c(1:4,10:12))
Example of dataset
Description
Toy example to launch functions.
Usage
example_dataset
Format
The dimensions of the dataset are 20 rows and 12 columns and this dataset contains 12 spatial-time series.