| compmus_normalise | R Documentation |
We use a number of vector normalisation strategies in Computational Musicology. This function brings them together into one place, along with common alternative names.
compmus_normalise(v, method = "euclidean") compmus_normalize(v, method = "euclidean")
v |
A numeric vector. |
method |
A character string indicating which normalization to use (see Details). Default is the Euclidean norm. |
The following methods are supported.
identity,idNo normalisation.
harmonicHarmonic mean.
manhattan,L1Manhattan (L1) norm.
euclidean,L2Euclidean (L2) norm.
chebyshev,maximumChebyshev (maximum) norm.
aitchison,clrAitchison's clr transformation.
softmaxSoftmax.
compmus_normalize: Normalize vectors
library(tidyverse)
get_tidy_audio_analysis("6IQILcYkN2S2eSu5IHoPEH") %>%
select(segments) %>%
unnest(segments) %>%
mutate(pitches = map(pitches, compmus_normalise, "euclidean"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.