Information Capacity
R Matlab Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
align_dir.m
align_pair.m
align_pairdir.m
align_subdir.m
batcher-R.sh
batcher-gp.sh
batcher.sh
data_handling.R
eval.R
evalGP.m
evalGPdir.m
evalGPsubdirs.m
evalVarGP.m
frontend.R
infocapacity.R
removeBadFiles.m
selectDirs.m
sp-knn-1.R

README.md

Information Capacity

MATLAB and R code for Information Capacity Computation.

Requirements

  1. Canonical Time Warping (CTW) code

  2. Var-GP-LVM software including the other Matlab toolboxes from N.Lawrence

Extract CTW code to "ctw" subfolder (you should run "make" according to the CTW installation instructions) and all the GP-related toolboxes to "gp" subfolder. The MATLAB scripts will load the paths then automatically.

You'll also probably need to install R packages called "methods" and "kernlab".

Brief How-To-Use

The server-side uses shell scripts to execute both R and Matlab scripts. There's 6 main Matlab functions: 4 CTW aligning functions (align_pairdir, align_dir, align_subdir, align_pair) and 2 GP function (evalGPdir, evalVarGP). The R functions are controlled with Rscript frontend "frontend.R".

There's shell scripts for:

  1. Just for R code (to use without alignment): "batcher-R.sh"
  • 1 argument for Rscript
  1. Matlab and R with CTW: "batcher.sh"
  • first arg for Matlab (CTW function)
  • second arg for Rscript
  1. Matlab and R with CTW and GP: "batcher-gp.sh"
  • first arg for Matlab (CTW function)
  • second arg for Matlab (GP function)
  • third arg for Rscript

To use them, you have to change Matlab and Rscript exec paths.

Examples

Parameter-blown examples for shell:

  1. With 2 files + CTW + PCA:
$ ./batcher.sh "align_pair('./path/to/dir/testSeq1.txt', './path/to/dir/testSeq2.txt', \
'./path/to/dir/alignment/')" "./frontend.R --fps 120 --method pairdir --maindir ./path/to/dir/ \
--dim_reduction pca --calculate_residuals TRUE --save_residuals FALSE --residualdir residuals/ \
--resultfile results.txt --align TRUE"
  1. With 2 files + CTW + Var-GP:
$ ./batcher_gp.sh "align_pair('./path/to/dir/9.txt', './path/to/dir/10.txt', \
'./path/to/dir/alignment/')" "evalGPdir('./path/to/dir/', './path/to/dir/gp')" \
"./frontend.R --fps 200 --method pairdir --maindir ./path/to/dir/gp --dim_reduction gp \
--calculate_residuals TRUE --save_residuals FALSE --residualdir residuals/ \
--resultfile results.txt --align TRUE --alidir ../alignment"