Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/deliveryPrediction.R
The function predicts the probability of each day in an accelerometry dataset being caused from delivery activity instead of human activity. The prediction model can be selected from one of three models, a Random Forest, a logistic regression, and a convolutional neural network (default: Random Forest).
1 | deliveryPrediction(df, feats, model = c("RF", "GLM", "NN"), ...)
|
df |
A dataframe. The source accelerometry dataset, in dataframe format. |
feats |
A dataframe. Features output from the |
model |
A character. Indicates which prediction model to use. ‘RF’ is a Random Forest. ‘GLM’ is a logistic regression, and ‘NN’ is a convolutional neural network. |
... |
not used at this time |
Function works for data consisting of one or multiple unique trials.
A dataframe is returned with a predicted probability of each day being a delivery activity day.
The input dataframe should have the following columns: ‘TimeStamp’, ‘axis1’, ‘axis2’, ‘axis3’, ‘vm’, where ‘vm’ is the vector magnitude of axes 1, 2, and 3. Dataframe should also be formatted to 60 second epoch.
Ryan Moore ryan.moore@vumc.org, Cole Beck cole.beck@vumc.org, and Leena Choi leena.choi@Vanderbilt.Edu
deliveryFeatures
, deliveryPred
1 2 3 4 5 | data(deliveryData)
deliveryDataProcessed <- deliveryPreprocess(df = deliveryData)
deliveryDataFeats <- deliveryFeatures(df = deliveryDataProcessed)
deliveryPrediction(deliveryDataProcessed, deliveryDataFeats)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.