extract_feature_overlap: Extract overlap between two aligned signatures

View source: R/features.R

extract_feature_overlapR Documentation

Extract overlap between two aligned signatures

Description

The overlap of two aligned signatures is defined as the ratio of the number of non-missing overlapping values of the two aligned signatures and the length of the shorter signature. A larger overlap indicates a higher level of agreement between the signatures.

Usage

extract_feature_overlap(aligned)

Arguments

aligned

data frame with variable x (for location) and two or more measurements (the bullets entry in the list returned from sig_align)

Value

value between 0 and 1, ratio of length of overlap compared to smaller length of the signature

See Also

Other alignment-related-features: extract_feature_D(), extract_feature_ccf(), extract_feature_lag_mm(), extract_feature_lag(), extract_feature_length_mm(), extract_feature_length(), extract_features_all()

Examples

## Not run: 
library(bulletxtrctr)
library(x3ptools)

example_data <- bullet_pipeline(
  location = list(
    Bullet1 = c(hamby252demo$bullet1[2]),
    Bullet2 = c(hamby252demo$bullet2[4])
  ),
  x3p_clean = function(x) x %>%
      x3p_scale_unit(scale_by=10^6) %>%
      rotate_x3p(angle = -90) %>%
      y_flip_x3p()
)

alignment <- sig_align(example_data$sigs[[1]]$sig,
                       example_data$sigs[[2]]$sig)

extract_feature_overlap(alignment$lands)

## End(Not run)

heike/bulletxtrctr documentation built on March 8, 2024, 7:41 p.m.