MyNixOS website logo
Description

Generalized Spatial-Time Sequence Miner.

Implementations of the algorithms present article Generalized Spatial-Time Sequence Miner, original title (Castro, Antonio; Borges, Heraldo ; Pacitti, Esther ; Porto, Fabio ; Coutinho, Rafaelli ; Ogasawara, Eduardo . Generalização de Mineração de Sequências Restritas no Espaço e no Tempo. In: XXXVI SBBD - Simpósio Brasileiro de Banco de Dados, 2021 <doi:10.5753/sbbd.2021.17891>).

gstsm

GitHub followers GitHub Repo stars GitHub R package version CRAN/METACRAN CRAN/METACRAN

R package that implements GSTSM

AboutExampleDocumentationCreditsLicense

cefet

About

This R package was made based in the article Generalização de Mineração de Sequências Restritas no Espaço e no Tempo, so its main goal is mining patterns present in spatio-temporal datasets. The R package was developed at CEFET/RJ for academic work.

In the next sections you can check an example of the running code, its documentation, development steps and so on. Please feel free to make contributions and contact in case of bugs/suggestions.

Example

This example is also present in example folder, just clone it to run it.

library("gstsm")

D <- as.data.frame(matrix(c("B", "B", "A", "C", "A",
                      "C", "B", "C", "A", "B",
                      "C", "C", "A", "C", "A",
                      "B", "B", "D", "A", "B",
                      "B", "D", "D", "B", "D"
), nrow = 5, ncol = 5, byrow=TRUE))

ponto <- c("p1", "p2", "p3", "p4", "p5")
x <- c(1, 2, 3, 4, 5)
y <- c(0, 0, 0, 0, 0)
z <- y
P <- data.frame(ponto=ponto, x=x, y=y, z=z, stringsAsFactors = FALSE)

gamma <- 0.8
beta <- 2
sigma <- 1

gstsm_object <- gstsm(D, P, gamma, beta, sigma)

result <- mine(gstsm_object)

Documentation

Here all the functions are described.

gstsm

#' GSTSM
#'
#' S3 class definition for GSTSM.
#'
#' This algorithm is designed to the identification of frequent sequences in
#' STS datasets from the concept of Solid Ranged Groups (SRG).
#' GSTSM is based on the candidate-generating principle.
#' The goal is to start finding SRGs for sequences of size one.
#' Then it explores the support and the number of occurrences of SRGs for
#' larger sequences with a limited number of scans over the database.
#'
#' @param sts_dataset STS dataset
#' @param spatial_positions set of spatial positions
#' @param gamma minimum temporal frequency
#' @param beta minimum group size
#' @param sigma maximum distance between group points
#' @return a GSTSM object
#' @importFrom stats na.exclude
#' @export gstsm
gstsm <- function(sts_dataset, spatial_positions, gamma, beta, sigma)

find

#' S3 class definition for find method.
#'
#' @param object a GSTSM object
#' @param k size of sequence
#' @param ck set of candidates
#' @return Solid Ranged-Group(s) of all candidate sequences
#' @export find
find <- function(object, ck)

merge

#' S3 class definition for merge method.
#'
#' @param object a GSTSM object
#' @param ck set of candidates
#' @return Solid Ranged-Group(s) of all candidate sequences
#' @export merge
merge <- function(object, ck)

generate_candidates

#' S3 class definition for generate_candidates method.
#'
#' @param object a GSTSM object
#' @param srgk set of Solid Ranged Groups
#' @param k size of sequence
#' @return candidate sequences of size k + 1
#' @export generate_candidates
generate_candidates <- function(object, srgk)

mine

#' S3 class definition for mine method.
#'
#' @param object a GSTSM object
#' @return all Solid Ranged Group(s) found, of all sizes
#' @export mine
mine <- function(object)

Credits

This package was made with the following open source projects:

License

MIT


Antonio Castro • @castroantonio
Cássio Souza • @cassiofb-dev
Jorge Rodrigues • @jorge-g99
Esther Pacitti •
Fabio Porto •
Florent Masseglia •
Rafaelli Coutinho • @rafaelliiicoutinho
Eduardo Ogasawara • @eogasawara
.

Metadata

Version

1.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows