TLBC: Two-Level Behavior Classification

Contains functions for training and applying two-level random forest and hidden Markov models for human behavior classification from raw tri-axial accelerometer and/or GPS data. Includes functions for training a two-level model, applying the model to data, and computing performance.

Install the latest version of this package by entering the following in R:
AuthorKatherine Ellis
Date of publication2015-10-14 18:13:22
MaintainerKatherine Ellis <>

View on CRAN

Man pages

alignStart: Function to align start of a window

annotationsToLabels: Function to convert bout-level annotations to instance-level...

calcPerformance: Function to calculate performance of a classification model

classify: Function to classify accelerometer and/or GPS data

clearFiles: Clear files

computeEmissionProbs: Compute emission probabilities

computeOneAccFeat: Compute one acceleration feature

computeOneGPSFeat: Compute one GPS feature

computePriorProbs: Compute prior probabilities

computeTransProbs: Compute transition probabilities

distance: Distance

extractAccelerometerFeatures: Extract accelerometer features

extractAccFeatsFile: Extract accelerometer features from a file

extractFeatsPALMSDir: Extract GPS features from a PALMS directory

extractFeatsPALMSOneFile: Extract GPS features from a PALMS file

extractLabelsDir: Extract labels from a directory

extractLabelsSingleFile: Extract labels from a directory

getDateFmt: Get date format

hmm: Hidden Markov model

isFeatureDirectory: Is feature directory?

isInstanceFormat: Is instance format?

loadData: Load data

loadFeatures: Load features

loadLabels: Load labels

loadModel: Load model

loadPredictions: Load predictions

loadPredictionsAndLabels: Load predictions and labels

looXval: Function to perform leave-one-out cross-validation

rf: Random Forest

senseCamLabels: SenseCam Labels

sensorsToFeatures: Function to extract featurese from raw sensor data

stratSample: Stratified sample

testHMM: Test a hidden Markov model

testRF: Test a random forest classifier

testTwoRFs: Test two random forest classifiers

TLBC-package: Two-Level Behavior Classification

trainHMM: Train a hidden Markov model

trainModel: Function to train a two-level model from accelerometer and/or...

trainRF: Train a random forest classifier

winSize: Window Size

writePredictions: Write predictions to a file


alignStart Man page
annotationsToLabels Man page
calcPerformance Man page
calcPerformanceFromLabels Man page
classify Man page
clearFiles Man page
computeEmissionProbs Man page
computeOneAccFeat Man page
computeOneGPSFeat Man page
computePriorProbs Man page
computeTransProbs Man page
distance Man page
extractAccelerometerFeatures Man page
extractAccFeatsFile Man page
extractFeatsPALMSDir Man page
extractFeatsPALMSOneFile Man page
extractLabelsDir Man page
extractLabelsSingleFile Man page
getDateFmt Man page
hmm Man page
isFeatureDirectory Man page
isInstanceFormat Man page
loadData Man page
loadFeatures Man page
loadLabels Man page
loadModel Man page
loadPredictions Man page
loadPredictionsAndLabels Man page
looXval Man page
looXvalFromFeats Man page
rf Man page
senseCamLabels Man page
senseCamLabelsFile Man page
sensorsToFeatures Man page
stratSample Man page
testAllDir Man page
testHMM Man page
testRF Man page
testTwoRFs Man page
TLBC Man page
TLBC-package Man page
trainFromFeatures Man page
trainHMM Man page
trainModel Man page
trainRF Man page
winSize Man page
writePredictions Man page

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.