run_tSpace: Run the matlab version of the tSpace algorithm

Description Usage Arguments Value Author(s)

View source: R/MATLABfuncs.R

Description

This is an interface to the matlab implementation of the tSpace algorithm described in Dermadi et al, modified for improved error handling.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
run_tSpace(
  data,
  trajectories = 100,
  k = c(20, 30, 50, 100),
  l = "auto",
  metric = "euclidean",
  graphs = 5,
  landmarks = 20,
  voting_scheme = "exponential",
  label = "",
  matlab_version = "auto",
  matlab_path = "~/Documents/MATLAB"
)

Arguments

data

A matrix-like object where cells correspond to rows and features correspond to columns

trajectories

The number of trajectories to calculate.

k

Number of nearest neighbors (passed to the k argument of wanderlust). If a vector of integers is provided (recommended), the tSpace calculation will be attempted on the smallest value in the vector and then reattempted on successively higher values of k should the algorithm fail. tSpace caclualtions that require an excessively high k value suggest the presence of outlier data points that should be removed from the input data for better performance.

l

Number of nearest neighbors (passed to the l argumet of wanderlust). If set to 'auto' (default), this parameter will be 2/3 of k (rounded to the nearest integer). If k is a vector, l must be a vector the same length and all corresponding values must be less than k.

metric

A distance metric accepted by the dist function in matlab (wanderlust): euclidean, correlation, cityblock, chebyshev, minkowski, hamming, mahalanobis, jaccard, cosine or spearman.

graphs

Number of graphs over which to average trajectories (wanderlust).

landmarks

Number of landmarks (wanderlust).

voting_scheme

Arugment passed to wanderlust.

label

A character string to be incorporated into the tSpace column labels. Default is an empty label.

matlab_version

A character string specifying the active matlab version (e.g. "R2019a"). If set to "auto," the latest version of matlab will be used. Only works for mac users.

matlab_path

The path to the MATLAB folder containing cyt and tSpace scripts.

Value

A list that includes the following elements:

tPCs

A cell by tPC matrix of the PCA reduction of the trajectory data.

traj

A cell by trajectory matrix containing the trajectories.

clusters

A vector containing the cluster definitions used to initiate tSpace.

pPCA

A cell by pPCA matrix of the PCA reduction of the parameters.

Author(s)

Kevin Brulois


kbrulois/MATLABfuncs documentation built on Sept. 14, 2021, 2:02 p.m.