analyze_questioned_documents: Analyze Questioned Documents

View source: R/cluster_analysis.R

analyze_questioned_documentsR Documentation

Analyze Questioned Documents

Description

analyze_questioned_documents() estimates the posterior probability of writership for the questioned documents using Markov Chain Monte Carlo (MCMC) draws from a hierarchical model created with fit_model().

Usage

analyze_questioned_documents(
  main_dir,
  questioned_docs,
  model,
  num_cores,
  writer_indices,
  doc_indices
)

Arguments

main_dir

A directory that contains a cluster template created by make_clustering_template()

questioned_docs

A directory containing questioned documents

model

A fitted model created by fit_model()

num_cores

An integer number of cores to use for parallel processing with the doParallel package.

writer_indices

A vector of start and stop characters for writer IDs in file names

doc_indices

A vector of start and stop characters for document names in file names

Value

A list of likelihoods, votes, and posterior probabilities of writership for each questioned document.

Examples

## Not run: 
main_dir <- "/path/to/main_dir"
questioned_docs <- "/path/to/questioned_images"
analysis <- analyze_questioned_documents(
  main_dir = main_dir,
  questioned_docs = questioned_docs,
  model = model,
  num_cores = 2,
  writer_indices = c(2, 5),
  doc_indices = c(7, 18)
)
analysis$posterior_probabilities

## End(Not run)


handwriter documentation built on Oct. 25, 2024, 1:06 a.m.