Last chance! 50% off unlimited learning
Sale ends in
Estimates the number of harmonics required for the four Fourier methods
implemented in Momocs: elliptical Fourier analysis
(see efourier), radii variation analysis (see rfourier)
and tangent angle analysis (see tfourier) and
discrete Fourier transform (see dfourier).
It returns and can plot cumulated harmonic power whether dropping
the first harmonic or not, and based and the maximum possible number
of harmonics on the Coo
object.
calibrate_harmonicpower()calibrate_harmonicpower_efourier(
x,
id = 1:length(x),
nb.h,
drop = 1,
thresh = c(90, 95, 99, 99.9),
plot = TRUE
)
calibrate_harmonicpower_rfourier(
x,
id = 1:length(x),
nb.h,
drop = 1,
thresh = c(90, 95, 99, 99.9),
plot = TRUE
)
calibrate_harmonicpower_tfourier(
x,
id = 1:length(x),
nb.h,
drop = 1,
thresh = c(90, 95, 99, 99.9),
plot = TRUE
)
calibrate_harmonicpower_sfourier(
x,
id = 1:length(x),
nb.h,
drop = 1,
thresh = c(90, 95, 99, 99.9),
plot = TRUE
)
calibrate_harmonicpower_dfourier(
x,
id = 1:length(x),
nb.h,
drop = 1,
thresh = c(90, 95, 99, 99.9),
plot = TRUE
)
a Coo
of Opn
object
the shapes on which to perform calibrate_harmonicpower. All of them by default
numeric the maximum number of harmonic, on which to base the cumsum
numeric the number of harmonics to drop for the cumulative sum
vector of numeric for drawing horizontal lines, and also used for
minh
below
logical whether to plot the result or simply return the matrix
Silent message and progress bars (if any) with options("verbose"=FALSE)
.
returns a list with component:
gg
a ggplot object, q
the quantile matrix
minh
a quick summary that returns the number of harmonics required to achieve
a certain proportion of the total harmonic power.
The power of a given harmonic
Other calibration:
calibrate_deviations()
,
calibrate_r2()
,
calibrate_reconstructions
# NOT RUN {
b5 <- bot %>% slice(1:5)
b5 %>% calibrate_harmonicpower_efourier(nb.h=12)
b5 %>% calibrate_harmonicpower_rfourier(nb.h=12)
b5 %>% calibrate_harmonicpower_tfourier(nb.h=12)
b5 %>% calibrate_harmonicpower_sfourier(nb.h=12)
# on Opn
olea %>% slice(1:5) %>%
calibrate_harmonicpower_dfourier(nb.h=12)
# }
# NOT RUN {
# let customize the ggplot
library(ggplot2)
cal <- b5 %>% calibrate_harmonicpower_efourier(nb.h=12)
cal$gg + theme_minimal() +
coord_cartesian(xlim=c(3.5, 12.5), ylim=c(90, 100)) +
ggtitle("Harmonic power calibration")
# }
Run the code above in your browser using DataLab