Learn R Programming

PhysicalActivity (version 0.2-4)

deliveryPrediction: Predict Delivery Days in Accelerometry Data

Description

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).

Usage

deliveryPrediction(df, feats, model = c("RF", "GLM", "NN"), ...)

Arguments

df

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

feats

A dataframe. Features output from the deliveryFeatures function.

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

Value

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

Details

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

See Also

deliveryFeatures, deliveryPred

Examples

Run this code
# NOT RUN {
data(deliveryData)

deliveryDataProcessed <- deliveryPreprocess(df = deliveryData)
deliveryDataFeats <- deliveryFeatures(df = deliveryDataProcessed)
deliveryPrediction(deliveryDataProcessed, deliveryDataFeats)

# }

Run the code above in your browser using DataLab