Description Usage Arguments Details See Also Examples
Takes a segmented "FemFit" object and constructs new baseline and event labels within the specified JSONLabel.
1 2 | segmentRefine_pcurve(x, whichSession, whichJSONLabel, windowSize = 5,
windowTolerance = 1, timeScale = 1000, ...)
|
x |
An "FemFit" object. |
whichSession |
A character string which identifies which session to edit. |
whichJSONLabel |
A character string which identifies which |
windowSize |
Define event duration. Defaults to 5 seconds with |
windowTolerance |
Define the tolerance for defining an event. A numeric vector of length two can be provided. Defaults to +/- 1 second with |
timeScale |
Time scale to work on. Defaults to working in seconds. |
... |
Arguments passed to |
Conducts principal component analysis then fits a principal curve to the first principal component and time. Regions are identified temporally with the principal curve. Regions are classified as events if the region sits above the principal curve and meets the windowSize
specifications.
If a vector is inputted for either whichSession
or whichJSONLabel
, only the first element is used.
prcomp
and principal.curve
for how the main statistical learning components work.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Read in the FemFit data
AS005 = read_FemFit(c(
"Datasets_AukRepeat/61aa0782289af385_283_csv.zip",
"Datasets_AukRepeat/61aa0782289af385_284_csv.zip"
),
remove.NAs = TRUE
) %>%
# Segment the FemFit data
segment(
cp. = 0.001,
numOfNodesToLabel = list(c(3, 1, 3, 4), c(4, 1, 5, 3))
)
# Within a session refine the segmentation with principal curves
AS005r = segmentRefine_pcurve(
x = AS005,
whichSession = "283 09:28",
whichJSONLabel = "pfmc3x5s_rest30s",
windowTolerance = c(1, 1)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.