deliveryPred: Wrapper Function for Accelerometry data Preprocessing,...

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/deliveryPred.R

Description

The function is a wrapper function that performs preprocessing, feature extraction, and delivery day prediction of an accelerometry dataset. 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).

Usage

1
deliveryPred(df, model = c("RF", "NN", "GLM"))

Arguments

df

A dataframe. The source accelerometry dataset, in dataframe format.

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.

Details

Function works for data consisting of one or multiple unique trials.

Value

A dataframe is returned with a predicted probability of each day being a delivery activity day.

Note

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.

The function uses the default preprocessing criteria used in the development of the predictive models.

Author(s)

Ryan Moore ryan.moore@vumc.org, Cole Beck cole.beck@vumc.org, and Leena Choi leena.choi@Vanderbilt.Edu

See Also

deliveryPreprocess, deliveryFeatures, deliveryPrediction

Examples

1
2
3
data(deliveryData)

predictions <- deliveryPred(df = deliveryData, model = "GLM")

PhysicalActivity documentation built on Jan. 23, 2021, 1:06 a.m.