Skip to contents

Retrieves the aligned spectral sketch for a specified subject. If new data for that subject is provided, it projects that new data. Otherwise, it extracts the stored aligned sketch from the original analysis.

Usage

# S3 method for class 'hatsa_projector'
project_block(object, newdata = NULL, block, ...)

Arguments

object

A fitted hatsa_projector object.

newdata

Optional. A single numeric matrix of parcel time-series data (T_i x V_p) for the subject specified by block. If NULL, the stored sketch for the block is returned. If provided, this new data is projected.

block

An integer, the index of the subject (block) to project.

...

Additional arguments passed to predict.hatsa_projector if newdata is provided.

Value

A matrix (V_p x k) representing the aligned spectral sketch for the specified subject/block. Returns NULL or raises an error if the block is invalid or data is inappropriate.