View source: R/artifact_detection.R
compute_features2 | R Documentation |
This function computes features for support vector machines (SVM) analysis. It processes input data, applies wavelet coefficients computation, and aggregates various statistical measures over defined time chunks. The function is designed to work with data frames containing electrodermal activity (EDA) data, filtered EDA, and timestamps.
compute_features2(data)
data |
A data frame with columns for electrodermal activity (eda), filtered electrodermal activity (filtered eda), and timestamps (DateTime). It is assumed that the data frame has already been preprocessed appropriately for feature computation. |
The function internally computes wavelet coefficients and then divides the data into chunks of specified durations (1 second, 0.5 seconds, and a custom duration based on amplitude features). For each chunk, it calculates various statistical measures. The resulting data frame includes timestamps and the computed features, which can be used for further analysis or as input to machine learning models like SVM.
A data frame with computed features. Each row corresponds to a time chunk, and columns include statistical measures (like maximum, mean, standard deviation, median, and sum of positive values) of wavelet coefficients computed over different intervals (1 second, 0.5 seconds, and based on amplitude features).
## Not run:
# Assuming 'my_data' is a preprocessed data frame with the necessary columns
features <- compute_features2(my_data)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.