Skip to contents

Bases

Basis extraction and construction.

pca_basis()
Principal component basis of a beat matrix
dhmt_basis()
Discrete Hermite transform basis
dct_basis()
Discrete cosine transform basis (DCT-II)
random_basis()
Random orthogonal basis
extract_bases()
Extract PCA bases from a list of beat matrices
sign_fix()
Fix the sign of the columns of a basis
orthonormalize()
Orthonormalise the first k columns of a basis
complete_basis()
Complete a partial basis to a full orthogonal matrix
order_basis()
Order the columns of a basis by explained variance
basis_variance()
Average explained variance of each basis column
basis_frame()
Convert a basis to a tidy data frame

Alignment and geometry

Removing the indeterminacy of principal components.

align_basis()
Align a basis to a reference basis
principal_angles()
Principal angles between two subspaces
subspace_distance()
Distance between two subspaces

Pooling

Combining bases across records and sites.

pool_bases()
Pool patient-specific bases
gpa_bases()
Generalised Procrustes analysis of bases
hierarchical_pool()
Hierarchical Procrustes pooling
pool_spectral()
Pool second moments from per-record spectral summaries
pool_covariance()
PCA basis from an aggregated covariance matrix
energy_moment()
Energy-normalised moment of one record
pool_energy()
Pool energy-normalised moments
pool_shared()
Several shared bases from transmitted moments
select_shared()
Choose a shared basis for a record
attention_weights()
Attention weights over transmitted moments
pool_attention()
Attention pooling of transmitted moments
select_tau()
Choose the attention temperature from transmitted moments
select_attention()
Choose attention settings from transmitted moments
refine_moments()
Self-attention among records with doubly stochastic weights
stream_attention()
Attention with a query that grows with the record
pool_from_beats()
Pooled basis from a list of beat matrices
pool_all()
All pooling operators at once
leave_one_out_pool()
Leave-one-record-out pooled bases

Reconstruction and metrics

reconstruction_error()
Relative reconstruction error
reconstruction_curve()
Reconstruction error curve
compress_beats()
Compress and reconstruct beats
rate_distortion()
Rate–distortion curve of a quantised spectral codec
ari()
Adjusted Rand index
purity()
Cluster purity
prop_correct()
Local cluster consistency
cluster_metrics()
Cluster quality metrics
cluster_beats()
Cluster beats in a projected basis
jackknife_stability()
Jackknife stability of a pooled basis
bootstrap_ci()
Percentile bootstrap confidence interval
paired_bootstrap()
Paired bootstrap comparison
compare_methods()
Compare several methods across records

Simulation

simulate_beats()
Simulate ECG-like heartbeat matrices
corrupt_basis()
Corrupt a basis with random signs and permutations

ECG preprocessing and WFDB

segment_beats()
Segment ECG heartbeats around R peaks
prepare_record()
Prepare a record from a signal and its annotations
read_mitdb_csv()
Read a MIT-BIH CSV exported by rdsamp
read_mitdb_record()
Read and prepare a MIT-BIH record from CSV and annotation files
read_wfdb_header()
Read a WFDB header file
read_wfdb()
Read a WFDB signal record
download_physionet()
Download a PhysioNet database
read_database()
Beat matrices of a WFDB database
read_annotations()
Read a WFDB annotation file
ann_codes
WFDB annotation codes
beat_summary()
Beat-level summaries

Plotting

plot_beats()
Plot a sample of heartbeats
plot_mean_beat()
Plot the mean heartbeat
plot_basis()
Plot basis coefficients
plot_scree()
Plot a scree or cumulative variance curve
plot_reconstruction()
Plot reconstruction error curves
plot_cost_error()
Plot communication cost against reconstruction error
plot_clustering()
Plot clustering accuracy curves
plot_stability()
Plot jackknife stability
plot_simulation()
Plot simulation results
theme_bp()
Consistent ggplot2 theme
method_palette()
Colour palette for pooling methods