compare_writer_profiles: Compare Writer Profiles

View source: R/compare.R

compare_writer_profilesR Documentation

Compare Writer Profiles

Description

Compare the writer profiles from two handwritten documents to predict whether they were written by the same person. Use either a similarity score or a score-based likelihood ratio as a comparison method.

Usage

compare_writer_profiles(
  writer_profiles,
  score_only = TRUE,
  rforest = NULL,
  reference_scores = NULL
)

Arguments

writer_profiles

A dataframe of writer profiles or cluster fill rates calculated with get_cluster_fill_rates

score_only

TRUE returns only the similarity score. FALSE returns the similarity score and a score-based likelihood ratio for that score, calculated using reference_scores.

rforest

Optional. A random forest created with ranger::ranger(). If a random forest is not supplied, random_forest will be used.

reference_scores

Optional. A list of same writer and different writer similarity scores used for reference to calculate a score-based likelihood ratio. If reference scores are not supplied, ref_scores will be used only if score_only is FALSE. If score only is true, reference scores are unnecessary because a score-based likelihood ratio will not be calculated. If reference scores are supplied, score_only will automatically be set to FALSE.

Value

A dataframe

Examples

compare_writer_profiles(test[1:2, ], score_only = TRUE)

compare_writer_profiles(test[1:2, ], score_only = FALSE)


handwriterRF documentation built on April 4, 2025, 5:38 a.m.