Learn R Programming

PhysicalActivity (version 0.2-4)

deliveryPred: Wrapper Function for Accelerometry data Preprocessing, Feature Extraction, and Delivery Prediction

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

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.

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

deliveryPreprocess, deliveryFeatures, deliveryPrediction

Examples

Run this code
# NOT RUN {
data(deliveryData)

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

# }

Run the code above in your browser using DataLab