| Title: | Hyperspectral Modelling and Validation |
|---|---|
| Description: | Interpretable and black-box hyperspectral modelling with explicit spectral, spatial and temporal data contracts, grouped validation, reproducible evaluation, optional isolated model runtimes, and an interactive research workbench. Model and instrument qualification is recorded separately from interface availability. |
| Authors: | Raban Heller [aut, cre] (ORCID: <https://orcid.org/0000-0001-8006-9742>) |
| Maintainer: | Raban Heller <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9001 |
| Built: | 2026-11-04 22:06:33 UTC |
| Source: | https://github.com/CTTIR/hypermodR |
Attach predictions to observation identities
## S3 method for class 'hm_fit' augment(x, newdata, ...)## S3 method for class 'hm_fit' augment(x, newdata, ...)
x |
An |
newdata |
Explicit dataset accepted by |
... |
Arguments passed to prediction, including optional managed workers. |
Observation metadata with .fitted, and .resid for scalar numeric
outcomes. Matrix outputs remain one explicit list column.
Inspect model and training scope
## S3 method for class 'hm_fit' glance(x, ...)## S3 method for class 'hm_fit' glance(x, ...)
x |
An |
... |
Currently unused. |
One row recording model, task, training count, input track and the absence of inherited scientific qualification.
Queue uncertain training-pool cases for annotation review
hm_active_learning( predictions, pool, training_ids, heldout_ids, budget = 1L, seed = 1L, reference_revision, data, split )hm_active_learning( predictions, pool, training_ids, heldout_ids, budget = 1L, seed = 1L, reference_revision, data, split )
predictions |
Probabilistic |
pool |
Unlabelled data frame with observation_id and all task grouping columns. |
training_ids |
Character identities exactly matching the validated training partition. |
heldout_ids |
Character identities exactly matching the validated test partition. |
budget |
Positive integer number of pool cases to queue. |
seed |
Seed used only to break entropy ties. |
reference_revision |
Explicit immutable reference revision identifier. |
data |
Source data used to verify pool identities and grouping. |
split |
Validated grouped train/test split. |
Only training-access unlabelled rows may enter the pool. This creates a review queue; it does not acquire labels or modify annotations.
List with an entropy-ranked pending-review queue, seed, budget, reference revision, run hash, annotation owner and labels_acquired=FALSE.
Admit reviewed resolved metadata as an exact install plan
hm_admit_backend( resolution, reviewed_terms, cache = tools::R_user_dir("hypermodR", "cache"), hardware_verified = FALSE, checkpoint = NULL, port = 8000L )hm_admit_backend( resolution, reviewed_terms, cache = tools::R_user_dir("hypermodR", "cache"), hardware_verified = FALSE, checkpoint = NULL, port = 8000L )
resolution |
Result of hm_resolve_backend. |
reviewed_terms |
Full reviewed terms entries, preserving each package, version and artifact identity. Use the resolved entries after artifact notice review and set each reviewed flag to TRUE. |
cache |
External runtime cache. |
hardware_verified |
Whether exact driver/device ABI has been checked. |
checkpoint |
Optional exact local checkpoint artifact manifest for vLLM. |
port |
Unprivileged loopback server port. |
An hm_backend_plan bound to reviewed artifact terms and supplied
device/checkpoint admission.
Bind an annotation project to its immutable export contract
hm_annotation_contract(project, label_map)hm_annotation_contract(project, label_map)
project |
annot_project. |
label_map |
Named positive integer class codes; zero is background. |
Serializable exact manifest binding and label map.
Import, configuration and submission are separate explicit actions. Optional runtimes are never installed on launch. Each connection owns its state/jobs.
hm_app(launch = TRUE, host = "127.0.0.1", port = NULL, ...)hm_app(launch = TRUE, host = "127.0.0.1", port = NULL, ...)
launch |
Run the application; FALSE returns a shiny.appobj. |
host |
Listening interface, default loopback. |
port |
Optional listening port. |
... |
Arguments passed to shiny::runApp. |
A Shiny application, invisibly when launched.
Create an isolated workbench state
hm_app_state()hm_app_state()
An independent session state environment.
Apply a frozen calibrator without learning from new outcomes
hm_apply_calibration(calibration, predictions)hm_apply_calibration(calibration, predictions)
calibration |
Frozen |
predictions |
Probabilistic |
Does not learn from new outcomes. Abstention marks low confidence without deleting rows.
An updated hm_prediction with scaled probabilities,
maximum-probability labels, logical abstain vector and calibration
provenance.
Convert a qualified companion object
## S3 method for class 'cuvis_session' hm_as_dataset(x, profile = NULL, ...) ## S3 method for class 'cuvis_measurement' hm_as_dataset(x, profile = NULL, ...) ## S3 method for class 'annot_image' hm_as_dataset(x, profile = NULL, observations = .hm_image_observations(), ...) ## S3 method for class 'annot_project' hm_as_dataset(x, profile = NULL, ...) hm_as_dataset(x, profile = NULL, ...) ## Default S3 method: hm_as_dataset(x, profile = NULL, ...) ## S3 method for class 'hsi_cube' hm_as_dataset( x, profile = NULL, observations = .hm_image_observations(), geometry = .hm_native_geometry(), ... )## S3 method for class 'cuvis_session' hm_as_dataset(x, profile = NULL, ...) ## S3 method for class 'cuvis_measurement' hm_as_dataset(x, profile = NULL, ...) ## S3 method for class 'annot_image' hm_as_dataset(x, profile = NULL, observations = .hm_image_observations(), ...) ## S3 method for class 'annot_project' hm_as_dataset(x, profile = NULL, ...) hm_as_dataset(x, profile = NULL, ...) ## Default S3 method: hm_as_dataset(x, profile = NULL, ...) ## S3 method for class 'hsi_cube' hm_as_dataset( x, profile = NULL, observations = .hm_image_observations(), geometry = .hm_native_geometry(), ... )
x |
Companion object. |
profile |
Explicit source profile where required. |
... |
Adapter-specific arguments. |
observations |
Explicit acquisition and biological identities. |
geometry |
Source spatial geometry. |
hyperspectR cube conversion preserves measured bands, masks and declared geometry. A cube exported by this package also retains selected-frame observations and band metadata; recorded content identity must still match on reimport. Explicit observations override restored identities. hyperannotatR conversion uses a bounded public tile and records manifest/revision identity. CUVIS session enumeration and SDK scaling remain blocked pending source-backed fixtures. Conversion does not infer calibration.
HMDataset or HMSequence for an admitted class; unsupported classes and currently unqualified CUVIS sources raise typed errors.
Materialise one frame through hyperspectR
hm_as_hsi_cube(x, acquisition_id, frame_id = NULL, ...)hm_as_hsi_cube(x, acquisition_id, frame_id = NULL, ...)
x |
Spatial HMDataset. |
acquisition_id |
One acquisition ID. |
frame_id |
One frame ID for sequences; NULL for an image. |
... |
Reserved. |
An hsi_cube with explicit native band sorting map in metadata.
Inspect local runtime capabilities without starting services
hm_backend_capabilities()hm_backend_capabilities()
List with OS, architecture, R version, Python executable path, and explicit unestablished GPU qualification.
Plan an isolated runtime installation
hm_backend_plan( model_id, device = "auto", profile = NULL, cache = tools::R_user_dir("hypermodR", "cache"), capabilities = hm_backend_capabilities() )hm_backend_plan( model_id, device = "auto", profile = NULL, cache = tools::R_user_dir("hypermodR", "cache"), capabilities = hm_backend_capabilities() )
model_id |
Candidate or custom model identity. |
device |
Requested device. |
profile |
Exact custom artifact manifest; no upstream profile is inferred. |
cache |
External user cache. |
capabilities |
Local capability record. |
An hm_backend_plan containing the validated profile, capabilities,
cache, artifact-byte budget, actions and immutable digest.
Inspect a managed process
hm_backend_status(handle)hm_backend_status(handle)
handle |
Owned process handle. |
List with PID, model, alive flag, exit status and plan digest.
Apply immutable training transformations
hm_bake(recipe, newdata)hm_bake(recipe, newdata)
recipe |
Fitted recipe returned by |
newdata |
Numeric observation-by-feature matrix with the original input column count and ordering. |
Reuses frozen training transformations without learning from new data.
Numeric transformed matrix; rows retain input order and columns follow the fitted steps.
Admit a bounded Spectralverse benchmark protocol without accessing data
hm_benchmark_protocol(protocol, comparison = NULL)hm_benchmark_protocol(protocol, comparison = NULL)
protocol |
List declaring version=1, program=Spectralverse, cohort, role, dataset_revision, reference_revision, license_admitted, person_grouping_verified, source_cases, roi_ids, input_track, context_budget, pretraining_overlap, prior_outcome_access, target_access and capabilities. |
comparison |
Optional second protocol requiring identical cohort/revisions/cases/ROIs/input/context and target access. |
Cohorts are HeiPor (primary_anatomy), xeno (development_species_perfusion) and ManU (human_admission). ManU requires verified person grouping. Each capability lane supplies model_id, task, platform, logical qualified and evidence. Admission is declarative and does not access data or execute a benchmark.
List with validated protocol, content hash, target-role classification, capability-lane admission states, execution=not_run and scientific_qualification=FALSE.
Paired whole-unit bootstrap of fixed predictions
hm_bootstrap( evaluation, unit, draws = 200L, seed = 1L, level = 0.95, comparison = NULL )hm_bootstrap( evaluation, unit, draws = 200L, seed = 1L, level = 0.95, comparison = NULL )
evaluation |
An |
unit |
Reference column naming whole independent resampling units; connected biological/source components must not be split. |
draws |
Integer number of bootstrap replicates, at least two. |
seed |
Seed for reproducible unit sampling. |
level |
Interval coverage strictly between zero and one. |
comparison |
Optional exactly matched second evaluation for paired metric differences. |
Resamples complete units with replacement. Fitting and model-selection uncertainty are excluded. If any draw lacks valid metrics, intervals remain unavailable and status reports invalid draws.
List with percentile interval, draw-by-metric resamples, row indices, sampled units, validity flags, invalid draw count, seed, level and status.
Create independent in-memory cached values
hm_cache()hm_cache()
A list with get and set functions; get returns an independent copy.
Compute a complete cache identity
hm_cache_key(data, state = list())hm_cache_key(data, state = list())
data |
Data, including all source values and band metadata. |
state |
Reader, calibration, model and preprocessing state. |
SHA-256 identity. Lazy sources include declared content hashes.
Freeze temperature scaling and abstention using an inner held-out partition
hm_calibrate( predictions, reference, split, data, temperature_grid = c(0.5, 1, 2), abstention = 0, fit, outer_split )hm_calibrate( predictions, reference, split, data, temperature_grid = c(0.5, 1, 2), abstention = 0, fit, outer_split )
predictions |
Probabilistic predictions from fit on the inner held-out calibration partition. |
reference |
Exact source observation rows for the calibration partition, in prediction order. |
split |
Validated inner train/test split partitioning outer training. |
data |
Original source data used for fitting and split validation. |
temperature_grid |
Positive finite candidate temperatures. |
abstention |
Confidence threshold in |
fit |
Training-only |
outer_split |
Validated outer split whose training rows are partitioned by split. |
Selects the first temperature minimizing calibration log loss. Requires full class support and verifies the supplied predictions against the fit; outer test outcomes cannot enter calibration.
An hm_calibration containing selected temperature, abstention
threshold, class map, fit/calibration identities, reference hash and grid
scores.
Cancel only an owned modelling job
hm_cancel_job(job)hm_cancel_job(job)
job |
Owned job handle. |
Confirmed job state, invisibly.
Inspect installation and separately supplied parity evidence
hm_check_backend( model_id, tests = c("availability", "parity"), backend = NULL, parity = NULL )hm_check_backend( model_id, tests = c("availability", "parity"), backend = NULL, parity = NULL )
model_id |
Model identity. |
tests |
Requested checks. |
backend |
Installed backend. |
parity |
Named evidence including plan_digest and passed. |
Availability verifies the declared installation path, containment, artifact sizes/hashes and any Python environment inventory. Parity is caller-supplied evidence bound to the plan digest, reported as reported_pass rather than independently executed here. No scientific qualification follows.
List with model identity, availability status, reported parity status and scientific_qualification=FALSE.
Compare matched predictions using paired whole-unit resampling
hm_compare( evaluations, paired = TRUE, unit, draws = 200L, seed = 1L, family = NULL )hm_compare( evaluations, paired = TRUE, unit, draws = 200L, seed = 1L, family = NULL )
evaluations |
List of exactly two matched |
paired |
Must be TRUE. |
unit |
Reference column identifying independent whole units. |
draws |
Integer number of paired bootstrap draws, at least two. |
seed |
Reproducible resampling seed. |
family |
Optional descriptive comparison-family declaration, retained without multiplicity adjustment. |
Requires identical cases, references, task, class map, estimand, hierarchy and metric names. This is descriptive inference without multiplicity-adjusted significance claims.
An hm_evaluation list containing metric differences, paired
bootstrap uncertainty, family and interpretation.
Map image coordinates through explicit geometry
hm_coordinates(geometry, coordinates, inverse = FALSE)hm_coordinates(geometry, coordinates, inverse = FALSE)
geometry |
Geometry with origin and homogeneous transform. |
coordinates |
Two-column x,y matrix of source indices (1-based). |
inverse |
Map world coordinates back to source indices. |
A two-column numeric matrix.
Construct a native spectral dataset
hm_dataset(values, observations, bands, geometry = NULL, provenance = list())hm_dataset(values, observations, bands, geometry = NULL, provenance = list())
values |
Numeric observation-by-band matrix or y,x,wavelength array. |
observations |
Data frame with unique character observation_id; images also require image_id and acquisition_id. |
bands |
Band metadata with numeric wavelength in nm. Unknown wavelengths require availability='unavailable'. |
geometry |
Explicit origin and invertible homogeneous transform for images. |
provenance |
Reproducible source and calibration metadata. |
An HMDataset.
Declare the dual_stream_mhsi upstream candidate
hm_dual_stream_mhsi(task, parameters = list())hm_dual_stream_mhsi(task, parameters = list())
task |
An hm_task. |
parameters |
Explicit mode, provenance and preprocessing declarations. |
An hm_model_spec; upstream execution remains admission-gated.
Declare independent reference endpoints
hm_endpoint_contract(references)hm_endpoint_contract(references)
references |
Data frame with observation_id, endpoint and value. Missing values remain missing. |
Validated declaration, without claiming source truth.
Evaluate predictions against an explicitly aligned reference
hm_evaluate( predictions, reference, estimand = "pooled", resampling = NULL, hierarchy = c("subject_id", "acquisition_id") ) ## S3 method for class 'hm_evaluation' print(x, ...) ## S3 method for class 'hm_evaluation' summary(object, ...)hm_evaluate( predictions, reference, estimand = "pooled", resampling = NULL, hierarchy = c("subject_id", "acquisition_id") ) ## S3 method for class 'hm_evaluation' print(x, ...) ## S3 method for class 'hm_evaluation' summary(object, ...)
predictions |
An |
reference |
Data frame with observation_id in exactly prediction order and task outcome/reference columns. Reconstruction targets are supplied as the numeric matrix attribute target. For predictions in fitted recipe coordinates, bake this target with the fitted recipe and set attribute target_space to predictions$provenance$output_space. |
estimand |
Either pooled or equal_class_subject_acquisition. |
resampling |
Optional named argument list passed to |
hierarchy |
Two column names giving biological unit then acquisition for hierarchical categorical accuracy. |
x |
An object returned by |
... |
Additional arguments; forwarded to graphics for plotting, otherwise unused. |
object |
An object returned by |
The hierarchical estimand averages observations within class/acquisition, acquisitions within class/subject, subjects within class, then classes equally. Missing class support produces unavailable macro metrics. Anomaly scores are not calibrated risks; reconstruction spectral angles are radians and refer to the declared target coordinates. Named matrix reference/output columns must match exactly; no reordering is inferred. Survival uses comparable event-time pairs. Evaluation does not fit models or repair reference alignment.
An hm_evaluation list containing named numeric metrics,
task-specific per-class support/confusion, predictions, reference, estimand,
hierarchy and optional uncertainty.
The input object invisibly.
A list of descriptive fields.
Generate an explicitly synthetic grouped spectral example
hm_example(seed = 42L)hm_example(seed = 42L)
seed |
Nonnegative integer seed. |
An HMDataset with synthetic labels, subject groups and eight bands.
Export grouped annotations through hyperannotatR
hm_export_annotations(x, destination, groups, ...)hm_export_annotations(x, destination, groups, ...)
x |
Annotation project or session. |
destination |
Export directory. |
groups |
Explicit biological grouping table accepted by at_training_export. |
... |
Additional public export arguments. |
Companion export including integrity checks.
Export a reproducible workbench result
hm_export_result(result, path, include_private = FALSE)hm_export_result(result, path, include_private = FALSE)
result |
Completed fit, prediction, evaluation and configuration bundle. |
path |
New export directory, never an existing run. |
include_private |
Include fitted objects and original prediction identities. The default exports configuration, aggregate metrics and a reproduction script. |
Reference reproduction requires an explicitly supplied admitted backend and artifact_root; it retrains in an owned bounded job. Private reference exports include checked learned files. The generated read_private_fit() helper resolves their location after moving the export; use hm_predict with an owned matching backend_handle to verify and predict. Installed runtime receipts and cache paths are not portable exports. The destination is reserved before writing. Its completion marker appears only after reproduction code and any private artifacts are finalized. Interrupted exports retain a failed destination with partial contents for inspection; the destination cannot be read as a completed run.
Verified export directory, invisibly.
Extract admitted native upstream image features
hm_extract_native( model_id, cube, wavelengths, mask, admission, control = list() )hm_extract_native( model_id, cube, wavelengths, mask, admission, control = list() )
model_id |
Named candidate identity (htc, hyperfree or hypersigma). |
cube |
Numeric full-frame HWC array; spectral channels remain measured. |
wavelengths |
Strictly increasing measured wavelengths in nm. |
mask |
Logical full-frame eligible-pixel mask. |
admission |
Explicit exact source, checkpoint and separate rights admission. |
control |
Runtime list with an owned backend_handle and optional timeout. |
Only htc, hyperfree and hypersigma extraction are admitted by this entry point. The worker must verify its adapter-specific exact source/checkpoint/input contract. Admission requires execute_source_acknowledged, code_terms_admitted and weight_terms_admitted flags. Extraction is not upstream downstream-task training or scientific qualification; other named architectures remain blocked.
An hm_native_features list with worker-returned numeric
features, identity metadata, qualified=FALSE and input digest. Feature
shape is adapter-specific.
Fit a workflow using training indices only
hm_fit(workflow, data, split, control = list()) ## S3 method for class 'hm_fit' coef(object, ..., scale = c("fitted", "original")) ## S3 method for class 'hm_fit' print(x, ...) ## S3 method for class 'hm_fit' summary(object, ...)hm_fit(workflow, data, split, control = list()) ## S3 method for class 'hm_fit' coef(object, ..., scale = c("fitted", "original")) ## S3 method for class 'hm_fit' print(x, ...) ## S3 method for class 'hm_fit' summary(object, ...)
workflow |
An |
data |
An HMDataset of native spectra, or list with numeric values matrix, observations data frame, band_map and optional provenance. |
split |
One explicit train/test fold, normally from |
control |
Engine-control list: seed defaults to one; weights may align to all source rows or training rows. Optional tuning contains candidates, metric and direction. Reference workers require backend_handle and a new artifact_path. |
object |
An |
... |
Arguments forwarded to the fitted engine coefficient method where supported. |
scale |
Either fitted coordinates or original measured-band coordinates. |
x |
An |
Preprocessing and engine fitting use training rows only. Connected biological/source identities cannot cross train/test; inner folds must remain inside outer training. Spatial images/sequences require explicit supported routes and are never silently flattened. R reference spectral training currently admits reference:cnn1d, reference:spectral_vit, reference:masked_autoencoder, reference:vae, reference:distillation, reference:multitask and reference:domain_adversarial with the appropriate task; worker-level tensor families have a separate protocol. A fitted model is not independent scientific qualification.
Fitted coefficient availability depends on the engine. Original-band mapping is restricted to lm, glm, glmnet, pls, pcr and bayes_conjugate with globally affine scale, pca, select, derivative, resample or reflectance recipes. Nonlinear/missingness-dependent recipes, aliased coefficients and incompatible dimensions raise typed errors. Coefficients describe a fitted coordinate system and do not establish biological causality.
An hm_fit containing workflow, fitted recipe, engine, training
indices, validated split, original band map, input radiometric unit and
hash-bound provenance.
Engine coefficients with scale and link attributes. Original-scale output is a named intercept/band vector (or engine list of vectors), with band_map attached.
Print methods return the input invisibly.
Summary methods return model identity and training-row count.
Import an explicitly profiled TIVITA measurement list
hm_from_tivis( x, profile, observations = .hm_image_observations(), assets = data.frame(), registration_id = NULL, mask = NULL )hm_from_tivis( x, profile, observations = .hm_image_observations(), assets = data.frame(), registration_id = NULL, mask = NULL )
x |
Unclassed tivis_measurement result. |
profile |
Explicit hm_tivita_profile declaration. |
observations |
Explicit source/group identity. |
assets |
Asset inventory with role and registration_id columns. |
registration_id |
Expected registration identity. |
mask |
Optional logical y,x validity mask; NA remains unknown. |
HMDataset; no device calibration is inferred.
Declare the htc upstream candidate
hm_htc(task, parameters = list())hm_htc(task, parameters = list())
task |
An hm_task. |
parameters |
Explicit mode, provenance and preprocessing declarations. |
An hm_model_spec; upstream execution remains admission-gated.
Declare the hyperfree upstream candidate
hm_hyperfree(task, parameters = list())hm_hyperfree(task, parameters = list())
task |
An hm_task. |
parameters |
Explicit mode, provenance and preprocessing declarations. |
An hm_model_spec; upstream execution remains admission-gated.
Declare the hypersigma upstream candidate
hm_hypersigma(task, parameters = list())hm_hypersigma(task, parameters = list())
task |
An hm_task. |
parameters |
Explicit mode, provenance and preprocessing declarations. |
An hm_model_spec; upstream execution remains admission-gated.
Declare the hypervision upstream candidate
hm_hypervision(task, parameters = list())hm_hypervision(task, parameters = list())
task |
An hm_task. |
parameters |
Explicit mode, provenance and preprocessing declarations. |
An hm_model_spec; upstream execution remains admission-gated.
Install declared files into an immutable user runtime directory
hm_install_backend( plan, accept_terms = FALSE, offline = FALSE, acknowledge_custom_code = FALSE )hm_install_backend( plan, accept_terms = FALSE, offline = FALSE, acknowledge_custom_code = FALSE )
plan |
Resolved backend plan. |
accept_terms |
Explicit acceptance bound to this plan's terms and artifacts. |
offline |
Forbid network downloads. |
acknowledge_custom_code |
Explicit permission to run reviewed custom code. |
An hm_backend list with installation path, original plan and
installed_unverified state.
Inspect admitted instrument capabilities
hm_instrument_profiles()hm_instrument_profiles()
A data frame. Synthetic profiles are not device qualification.
Poll a modelling job
hm_job_status(job)hm_job_status(job)
job |
Owned job handle. |
State, elapsed time, result only after successful completion, and error.
Declare a model specification
hm_model_spec(model_id, task, parameters = list())hm_model_spec(model_id, task, parameters = list())
model_id |
Single model identifier from |
task |
An |
parameters |
Named list of engine-specific parameters; interpreted when fitting. |
This constructor declares intent and checks known core task compatibility. It neither installs a backend nor qualifies a model scientifically.
An hm_model_spec list containing model_id, task and
parameters.
List candidate model families
hm_models(task = NULL, backend = NULL, include_unavailable = TRUE)hm_models(task = NULL, backend = NULL, include_unavailable = TRUE)
task |
Optional task filter. |
backend |
Optional backend filter. |
include_unavailable |
Include unqualified candidates. |
Registry visibility denotes candidate declaration or setup availability, not installed execution or independent parity. Reference families have separate spectral/tensor routes; not every listed identity is accepted by hm_fit(). All returned scientific qualification flags remain FALSE.
List of model records with identity, supported task declarations, candidate backend, availability/admission status and scientific qualification.
Declare supplied physical forward and inverse kernels
hm_physics_kernel(forward, inverse, parameters = list(), source, units)hm_physics_kernel(forward, inverse, parameters = list(), source, units)
forward |
Function of concentrations and a parameter list, producing spectra. |
inverse |
Function of spectra and a parameter list, producing concentrations. |
parameters |
Serializable physical constants and assumptions. |
source |
Source identifier for the implemented physical model. |
units |
Named units for input and output quantities. |
A declared hm_physics_kernel. Supplying a function does not
validate
its physiological assumptions; independent standards remain necessary.
Explicitly pool all valid spatial pixels
hm_pool(x, mask = NULL, method = "mean", selection = list())hm_pool(x, mask = NULL, method = "mean", selection = list())
x |
Spectral dataset accepted by |
mask |
Optional logical array matching the block validity dimensions; no missing entries. |
method |
Pooling rule; currently only mean is supported. |
selection |
Named block selection passed to |
All eligible finite pixels in the selected support contribute equally; an empty eligible support is rejected.
List with a one-row band matrix values, band_map, and provenance
including eligible pixel count, equal weights and mask hash.
Index a portable spectral sequence without repairing chronology
hm_portable_sequence( frames, frame_index, observations, bands, geometry, provenance = list() )hm_portable_sequence( frames, frame_index, observations, bands, geometry, provenance = list() )
frames |
Numeric cubes or admitted RDS locators. |
frame_index |
Explicit frame table; time is source elapsed seconds, including missing or reversed values. |
observations |
Observation identities. |
bands |
Native band metadata. |
geometry |
Source grid. |
provenance |
Source evidence. |
HMSequence retaining original ordering and timing quality.
Predict with a fitted workflow
hm_predict(object, newdata, ...) ## S3 method for class 'hm_fit' hm_predict(object, newdata, ...) ## S3 method for class 'hm_fit' predict(object, newdata, ...)hm_predict(object, newdata, ...) ## S3 method for class 'hm_fit' hm_predict(object, newdata, ...) ## S3 method for class 'hm_fit' predict(object, newdata, ...)
object |
An |
newdata |
Native spectral data in the same form as hm_fit data, with exactly matching measured band semantics. |
... |
Engine prediction controls; reference workers require control with the owned backend_handle. |
Applies the frozen training recipe. Measured wavelength/unit/fwhm/native/canonical band metadata present during training must match exactly. Prediction does not fit preprocessing or use new outcomes. The declared radiometric unit must also match; calibration identities may differ between acquisitions. Older serialized fits without this unit contract must be refitted. Reconstruction after preprocessing is in fitted recipe coordinates, recorded as provenance$output_space. Evaluate it against a target baked with that recipe and the matching target_space reference attribute, never against untransformed spectra.
An hm_prediction in newdata observation order, with task-specific
values and optional class probabilities.
Validate model predictions
hm_prediction( values, task, observation_id, probabilities = NULL, class_map = NULL, provenance = list() ) ## S3 method for class 'hm_prediction' print(x, ...) ## S3 method for class 'hm_prediction' summary(object, ...) ## S3 method for class 'hm_prediction' plot(x, ...)hm_prediction( values, task, observation_id, probabilities = NULL, class_map = NULL, provenance = list() ) ## S3 method for class 'hm_prediction' print(x, ...) ## S3 method for class 'hm_prediction' summary(object, ...) ## S3 method for class 'hm_prediction' plot(x, ...)
values |
Prediction vector, or observation-by-output matrix for multilabel, unmixing and reconstruction. |
task |
An |
observation_id |
Unique nonmissing character identifiers in prediction row order. |
probabilities |
Optional numeric observation-by-class matrix in |
class_map |
Exact character class/label order, required for categorical and multilabel predictions. |
provenance |
List of source, fit and transformation provenance. |
x |
An object returned by |
... |
Additional arguments; forwarded to graphics for plotting, otherwise unused. |
object |
An object returned by |
Categorical labels must belong to the declared map. Unmixing outputs are nonnegative and sum to one unless task reference explicitly declares nonnegative-only abundances. This validation does not establish predictive accuracy or calibrated probabilities. Numeric scalar tasks (including survival risk) require finite numeric vectors; matrix tasks require finite numeric matrices. Named matrix outputs retain column identity.
An hm_prediction list retaining values, task, identities,
probabilities, class map and provenance.
The input object invisibly.
A list of descriptive fields.
The graphics plotting return value, invisibly.
Fit preprocessing on training spectra
hm_prep(recipe, training, wavelength = NULL)hm_prep(recipe, training, wavelength = NULL)
recipe |
Unfitted |
training |
Numeric observation-by-feature training matrix. |
wavelength |
Optional measured wavelength vector in nm, aligned to input columns; required by wavelength-dependent steps. |
Call only on the training partition. Selection, derivatives, resampling and PCA can change output dimensions; resampling marks the track as adapted.
A fitted hm_recipe containing learned step state, input/output
wavelength grids, feature count and training hash.
Declare auxiliary language-model prompt provenance
hm_prompt(text, origin, rendering = NULL, timestamps = NULL, images = NULL)hm_prompt(text, origin, rendering = NULL, timestamps = NULL, images = NULL)
text |
Prompt text. |
origin |
Origin of instructions, independent of held-out outcomes. |
rendering |
Rendering manifest for image content. |
timestamps |
Frame timestamps retained in order. |
images |
Optional PNG/JPEG data URLs from an explicitly manifested rendering. |
An hm_prompt list retaining text, origin, rendering, timestamps,
optional images, auxiliary_only flag and content digest.
Capture explicit reproducibility identities
hm_provenance(objects = list(), files = character(), resources = NULL)hm_provenance(objects = list(), files = character(), resources = NULL)
objects |
Named list of R objects whose serialized identities are hashed. |
files |
Character vector of existing file paths whose bytes are SHA-256 hashed. |
resources |
Optional resource declaration retained in the receipt. |
An hm_provenance receipt with object/file hashes, R version,
platform and resources.
Read a bounded spatial block
hm_read_block(x, selection = list()) ## S4 method for signature 'HMDataset' hm_read_block(x, selection = list())hm_read_block(x, selection = list()) ## S4 method for signature 'HMDataset' hm_read_block(x, selection = list())
x |
Spatial HMDataset or HMSequence. |
selection |
Named acquisition_id, frame_id, rows, cols and bands selectors. Out-of-grid rows/cols explicitly request invalid NA padding. |
Rows and cols are unique integer source-grid indices; out-of-grid values request NA padding marked invalid. Bands are valid positive 1-based indices. Select exactly one acquisition; sequence frames retain requested order. Variable grids must be read one frame at a time. Validity requires every selected band finite and any declared spatial mask TRUE. The byte check bounds planned output allocation, not total resident memory; RDS sources have a separate bounded deserialization admission check.
Named list with a numeric four-dimensional values array (y, x, wavelength, time), a logical three-dimensional valid array (y, x, time), observations, band_map, geometry and provenance. Default output budget is 256 MiB (option hypermodR.block_bytes).
Read and verify a completed run
hm_read_run(path)hm_read_run(path)
path |
Run directory created by |
Requires matching complete receipt, object SHA-256 and COMPLETE marker before reading the object. Read only trusted RDS sources.
The deserialized original R object.
Declare preprocessing steps
hm_recipe(steps = list())hm_recipe(steps = list())
steps |
List of step lists, each with a type and its required controls; see Details. |
Steps execute in list order. Learned quantities are estimated only
by hm_prep() on its supplied training matrix. Supported types are impute
(training column means), scale (training means and standard deviations), pca
(optional integer components), select (explicit unique integer bands),
normalize (row Euclidean norm), snv (row mean/standard deviation), msc
(training mean reference), reflectance (explicit dark and white band
vectors), derivative (adjacent finite differences per nm), resample
(explicit wavelength grid within measured support), and continuum (positive
upper concave envelope division). Missing values must be imputed before
steps requiring finite data.
An unfitted hm_recipe with native input track.
Describe confidence bins and coverage-risk without claiming OOD validation
hm_reliability(predictions, reference, breaks = seq(0, 1, length.out = 11))hm_reliability(predictions, reference, breaks = seq(0, 1, length.out = 11))
predictions |
Categorical |
reference |
Exactly aligned reference data frame accepted by
|
breaks |
Strictly increasing numeric confidence-bin boundaries from zero to one. |
Confidence is the maximum class probability. Empty bins or zero retained coverage have unavailable accuracy/risk. Confidence does not constitute a validated OOD detector.
List of bin counts/mean confidence/accuracy, coverage-risk table, evaluation scores and an OOD interpretation.
Render a declared three-band auxiliary image
hm_render_hsi(cube, wavelengths, bands, limits, source_id, timestamp = NULL)hm_render_hsi(cube, wavelengths, bands, limits, source_id, timestamp = NULL)
cube |
Finite height by width by channel numeric array. |
wavelengths |
Measured wavelength vector. |
bands |
Three distinct channel indices. |
limits |
Explicit common intensity range used for clipping and scaling. |
source_id |
Source provenance identity. |
timestamp |
Optional acquisition time. |
An hm_rendering list with a height-by-width-by-3 image scaled to
[0,1] and a hash-bound rendering manifest.
This explicit network operation resolves metadata only. It does not download model weights or install packages. Published terms and inherited distribution notices must be reviewed before converting the result into an install plan.
hm_resolve_backend( backend = c("reference_cpu", "vllm_linux_cuda"), model_id, python, uv = unname(Sys.which("uv")), directory = tempfile("resolution-", tmpdir = tools::R_user_dir("hypermodR", "cache")) )hm_resolve_backend( backend = c("reference_cpu", "vllm_linux_cuda"), model_id, python, uv = unname(Sys.which("uv")), directory = tempfile("resolution-", tmpdir = tools::R_user_dir("hypermodR", "cache")) )
backend |
reference_cpu. The former vllm_linux_cuda setup route is blocked pending a reviewed replacement for its retired vulnerable profile. |
model_id |
Exact model identity or reference family. |
python |
Explicit existing Python 3.11 or 3.12 executable. |
uv |
Explicit uv resolver executable (version 0.11.26). |
directory |
External persistent resolution directory. |
An hm_backend_resolution containing exact artifact profile,
package metadata, external directory, hard gates and pending qualification.
Resolve an immutable public Hugging Face checkpoint without downloading weights
hm_resolve_checkpoint( repository, revision, directory = tempfile("checkpoint-", tmpdir = tools::R_user_dir("hypermodR", "cache")) )hm_resolve_checkpoint( repository, revision, directory = tempfile("checkpoint-", tmpdir = tools::R_user_dir("hypermodR", "cache")) )
repository |
Public model repository owner/name. |
revision |
Exact 40-character commit SHA. |
directory |
New external metadata staging directory. |
List containing repository/revision, architecture, local checkpoint directory name, artifact hashes/sizes/URLs, unreviewed terms and pending qualification.
Declare bounded execution resources
hm_resources( cpus = 1L, threads = 1L, memory_mb = 1024, device = "cpu", timeout = 60, network = FALSE )hm_resources( cpus = 1L, threads = 1L, memory_mb = 1024, device = "cpu", timeout = 60, network = FALSE )
cpus |
Positive integer logical-CPU count selected from inherited allowed affinity. |
threads |
Positive integer numerical thread budget, no larger than cpus. |
memory_mb |
Positive finite per-process virtual address-space limit in MiB for bounded child execution. |
device |
Single device identifier. General bounded children require cpu. A separately admitted CUDA backend may select an explicit cuda:N device, subject to inherited visibility and verified hardware ABI. |
timeout |
Positive finite time budget in seconds. |
network |
Logical network-use policy declaration; network access is not isolated by this launcher. |
Bounded child routes currently require Linux taskset, prlimit and timeout. They apply inherited-affinity CPU subsets, numerical thread environment settings before startup, per-process RLIMIT_AS and an external elapsed timeout. Memory limits concern virtual address space, not aggregate descendant RSS; no additional CPU quota or network isolation is supplied. CUDA selection is admitted only by the backend launcher; hm_with_resources remains CPU-only. GPU memory is not limited, and admitting a device does not establish live GPU or scientific qualification. This is not a security sandbox.
An hm_resources list of the validated declarations.
Save an immutable run with an atomic completion receipt
hm_save_run(object, path)hm_save_run(object, path)
object |
R object to serialize and verify by readback. |
path |
New run-directory path whose parent already exists. |
Reserves a new directory, writes object.rds and a hash-bound receipt, and atomically finalizes COMPLETE. Existing paths are rejected. A failed write leaves a failed receipt for inspection; completion markers are removed.
Normalized run-directory path invisibly.
Construct a spectral sequence
hm_sequence( frames, frame_index, observations, bands, geometry, provenance = list() )hm_sequence( frames, frame_index, observations, bands, geometry, provenance = list() )
frames |
List of native y,x,wavelength arrays or declarative RDS sources. |
frame_index |
Frame metadata with character frame_id, sequence_id, acquisition_id and numeric source time in elapsed seconds (NA allowed). timing_quality marks ordered, unavailable, duplicate or reversed source timing; source order is retained. |
observations |
Observation metadata linked by frame_id. |
bands |
Band metadata in nm. |
geometry |
Explicit spatial geometry. |
provenance |
Source and timing declarations. |
An HMSequence.
Read native spectra without spatial reduction
hm_spectra(x, selection = list()) ## S4 method for signature 'HMDataset' hm_spectra(x, selection = list())hm_spectra(x, selection = list()) ## S4 method for signature 'HMDataset' hm_spectra(x, selection = list())
x |
HMDataset containing native spectra. |
selection |
Named list with character observation_id and positive bands. |
Only native spectral matrices are admitted; images require explicit spatial reduction. Bands are unique positive 1-based indices in requested order.
Named list with numeric observation-by-selected-band values matrix, selected observations in request order, band_map and source provenance.
Values must be supplied from measured or otherwise justified sources. This constructor records a declaration; it cannot verify the physical reference.
hm_spectral_library(values, wavelength, units, source, license)hm_spectral_library(values, wavelength, units, source, license)
values |
Numeric wavelength-by-component matrix. |
wavelength |
Strictly increasing wavelength centres in nm. |
units |
Character description of coefficient units. |
source |
Character source citation or persistent identifier. |
license |
Character declaration of reuse terms. |
An immutable-by-identity hm_spectral_library list.
Declare the spectralearth upstream candidate
hm_spectralearth(task, parameters = list())hm_spectralearth(task, parameters = list())
task |
An hm_task. |
parameters |
Explicit mode, provenance and preprocessing declarations. |
An hm_model_spec; upstream execution remains admission-gated.
Declare the spectralgpt upstream candidate
hm_spectralgpt(task, parameters = list())hm_spectralgpt(task, parameters = list())
task |
An hm_task. |
parameters |
Explicit mode, provenance and preprocessing declarations. |
An hm_model_spec; upstream execution remains admission-gated.
Plan grouped resampling
hm_split( data, task, design = "nested_grouped", seed = 1L, folds = 5L, inner_folds = 3L, ... )hm_split( data, task, design = "nested_grouped", seed = 1L, folds = 5L, inner_folds = 3L, ... )
data |
Observation data frame, HMDataset, or list containing observations. |
task |
An |
design |
One of grouped, nested_grouped or temporal. |
seed |
Seed for reproducible grouped assignment. |
folds |
Integer outer-fold count, at least two. |
inner_folds |
Integer inner-fold count for nested_grouped, at least two. |
... |
Temporal controls: time is the numeric timestamp-column name (default timestamp), cutoff is required, and nonnegative look_back/embargo use the same units as time. |
Groups connected through any task grouping column or known biological/source identities stay together; overlapping source windows are connected. Grouped assignment balances component counts rather than stratifying outcomes and rejects outer categorical folds without full class support. Temporal training precedes cutoff minus embargo and look-back; groups exposed at/after cutoff are removed entirely from training. Source times are not repaired or reinterpreted. Temporal results retain the selected time-column identity and its observations; fitting rejects a stale clock or altered partition. Regenerate the temporal split after changing timestamps.
An hm_split. Grouped designs contain folds (train/test row indices
and optional inner folds), component membership, observation identities and
hash. Temporal designs contain train/test/excluded indices, cutoff,
look-back and embargo.
Stage a bound integer prediction for human review
hm_stage_annotations(predictions, project, label_map, contract, model)hm_stage_annotations(predictions, project, label_map, contract, model)
predictions |
Integer y,x mask. NA is unknown; zero is background. |
project |
Destination annot_project. |
label_map |
Named class codes. |
contract |
hm_annotation_contract captured before prediction. |
model |
Model name, version and sha256 provenance. |
Companion staged patch with unknown mask receipt; never committed.
Start a process belonging to an installed runtime
hm_start_backend( backend, model = backend$plan$model_id, resources = hm_resources(), host = "127.0.0.1" )hm_start_backend( backend, model = backend$plan$model_id, resources = hm_resources(), host = "127.0.0.1" )
backend |
Installed backend receipt. |
model |
Expected model identity. |
resources |
An |
host |
Bind address, restricted to loopback. |
Starts the declared verified command through the Linux bounded child launcher described in hm_resources with one numerical thread. CUDA plans require explicit cuda:N selection, verified hardware ABI and a selected device within inherited CUDA_VISIBLE_DEVICES when set. CUDA memory is not limited by this launcher; CPU memory is per-process virtual address space, not aggregate RSS. Network remains a policy declaration. Admission is not live GPU qualification. Handles are valid only in their owning R session.
Mutable owned hm_backend_handle environment containing process,
PID, owner PID, model identity and plan digest.
Stop only an owned runtime process
hm_stop_backend(handle)hm_stop_backend(handle)
handle |
Owned process handle. |
Final backend-status list invisibly.
Bounded causal frame streaming
hm_stream(predict_frame, max_frames = 256L)hm_stream(predict_frame, max_frames = 256L)
predict_frame |
Function accepting a frame and its timestamp. |
max_frames |
Maximum frames before explicit reset. |
Mutable stream handle, with per-frame outputs and latency diagnostics.
Cancel a frame stream
hm_stream_cancel(stream)hm_stream_cancel(stream)
stream |
An hm_stream. |
The cancelled stream invisibly.
Push ordered frames into a stream
hm_stream_push(stream, frames, timestamps, sequence_id)hm_stream_push(stream, frames, timestamps, sequence_id)
stream |
An hm_stream. |
frames |
List of native frames; geometry may vary. |
timestamps |
Strictly increasing finite elapsed seconds. |
sequence_id |
Explicit recording identity. |
Outputs in source order, with timestamp and latency metadata.
Submit an isolated, cancellable modelling job
hm_submit_job( workflow, data, split, control = list(), resources = hm_resources() )hm_submit_job( workflow, data, split, control = list(), resources = hm_resources() )
workflow |
Validated modelling workflow. |
data |
Spectral dataset. |
split |
One explicit grouped train/test fold. |
control |
Fitting controls. |
resources |
Execution resource declaration. |
Input object size is checked before launching a bounded Linux CPU child. The launcher applies an inherited-affinity subset, per-process virtual address-space limit, numerical thread settings and external elapsed timeout; see hm_resources for limits and network policy. Poll hm_job_status() to collect completion or failure. Handles belong to the creating R session.
An owned job handle; poll with hm_job_status().
Declare a modelling task
hm_task(outcome, type, unit, groups, reference = NULL)hm_task(outcome, type, unit, groups, reference = NULL)
outcome |
Single outcome-column name, or NULL for clustering, anomaly, reconstruction or unmixing. |
type |
One of classification, regression, ordinal, multilabel, segmentation, unmixing, reconstruction, clustering, anomaly, survival or temporal. |
unit |
Observation unit: spectrum, pixel, roi, image, sequence or subject. |
groups |
Nonempty character vector of biological/source grouping column names. |
reference |
Optional reference declaration; survival uses time/status column names, unmixing may declare abundance_constraint, and temporal tasks may declare horizon. |
Segmentation requires pixel/image units; temporal tasks require sequence/subject units. Declaring a task does not establish an executable backend for every task/model combination.
An hm_task list recording outcome, type, unit, unique grouping
columns and reference.
Declare a causal temporal reference
hm_temporal_model(family, task, parameters = list())hm_temporal_model(family, task, parameters = list())
family |
Framewise, timestamp_mean, temporal_cnn, lstm, gru, transformer or state_space. |
task |
An hm_task. |
parameters |
Explicit sequence and training declarations. |
An hm_model_spec with a separate package reference identity.
Declare an explicit TIVITA array profile
hm_tivita_profile( wavelengths = NULL, device = "unknown", software = "unknown", evidence = "unavailable" )hm_tivita_profile( wavelengths = NULL, device = "unknown", software = "unknown", evidence = "unavailable" )
wavelengths |
Independently established wavelengths in nm; NULL preserves unknown. |
device |
Device declaration, not qualification. |
software |
Export software declaration. |
evidence |
Evidence identifier. |
Serializable profile list.
Select parameters using only grouped inner training folds
hm_tune( workflow, data, split, candidates, control = list(), metric = NULL, direction = c("minimize", "maximize") )hm_tune( workflow, data, split, candidates, control = list(), metric = NULL, direction = c("minimize", "maximize") )
workflow |
An |
data |
Source data accepted by |
split |
Validated outer split containing inner grouped folds; their test rows must cover outer training exactly once. |
candidates |
Nonempty list of complete model-parameter lists. |
control |
Fit-control list; resources must declare one CPU/thread. Optional max_trials must cover all candidates and seed controls reproducibility. |
metric |
Metric name returned by |
direction |
Whether smaller or larger mean inner-fold scores are preferred. |
Search is sequential inside one bounded child, so the declared elapsed timeout covers the entire search and final refit. The first tied candidate wins. Outer test outcomes are excluded from selection.
An outer-training hm_fit refitted with the winning parameters and
a tuning ledger containing fold scores, identities, seeds and protocol
hashes.
Verify source identities against a provenance receipt
hm_verify_provenance(receipt, objects = list())hm_verify_provenance(receipt, objects = list())
receipt |
An |
objects |
Named objects corresponding exactly to those originally recorded. |
Rehashes the recorded file paths and supplied objects. Does not compare current R/platform metadata or establish source truth.
TRUE invisibly on matching hashes; otherwise raises an integrity error.
Verify a signed registry release
hm_verify_registry( path, signature, key, trusted_keys, revoked_keys = character(), minimum_version = 1L, now = Sys.time() )hm_verify_registry( path, signature, key, trusted_keys, revoked_keys = character(), minimum_version = 1L, now = Sys.time() )
path |
Registry JSON file. |
signature |
Detached SHA256 RSA signature file. |
key |
PEM public key file provisioned by the maintainer. |
trusted_keys |
Allowlisted SHA256 hashes of public key files. |
revoked_keys |
Revoked key hashes. |
minimum_version |
Minimum allowed integer release sequence. |
now |
Verification time. |
An hm_registry_verification list with verified flag, file digest,
trusted key fingerprint and release sequence.
Query an explicitly configured OpenAI-compatible vLLM endpoint
hm_vllm_chat( endpoint, model, prompt, allow_remote = FALSE, disclosure = NULL, token = NULL, timeout = 30, max_bytes = 1024^2, generation = list(temperature = 0, max_tokens = 256L), .transport = .hm_vllm_transport )hm_vllm_chat( endpoint, model, prompt, allow_remote = FALSE, disclosure = NULL, token = NULL, timeout = 30, max_bytes = 1024^2, generation = list(temperature = 0, max_tokens = 256L), .transport = .hm_vllm_transport )
endpoint |
Explicit server base URL. |
model |
Exact served model identity. |
prompt |
A provenance-bearing prompt. |
allow_remote |
Explicit transmission consent for non-loopback endpoints. |
disclosure |
Description of the data transmitted to a remote endpoint. |
token |
Optional authentication secret, excluded from receipts and errors. |
timeout |
Maximum seconds. |
max_bytes |
Maximum request/response bytes. |
generation |
Deterministic generation settings. |
.transport |
Internal transport override for protocol testing. |
The endpoint must include the API base path expected before /chat/completions (for example /v1). Remote transmission requires HTTPS, allow_remote=TRUE and disclosure. Stock native HSI architectures are rejected. Responses must identify the exact served model, contain one choice and finish with stop. Text is auxiliary output with no calibrated probability interpretation.
List with response text, exact model, prompt digest/origin, rendering/timestamps, generation settings, remote/disclosure fields and auxiliary-only, uncalibrated semantics.
Run an R expression in a bounded child process
hm_with_resources(resources, code)hm_with_resources(resources, code)
resources |
An |
code |
Unevaluated expression evaluated in a bounded child with its referenced serializable caller bindings. |
Evaluation occurs in a fresh child, so side effects on ordinary parent R objects are not propagated. Use serializable inputs and results; live handles are unsuitable. Linux child limits are described in hm_resources. Nested evaluation inside an already bounded child must reuse the identical outer budget. Unsupported platforms/devices fail admission rather than executing without limits.
The serialized value of code returned from the child.
Exchange bounded typed arrays with an owned worker
hm_worker_request( handle, operation = "handshake", array = NULL, channels = NULL, timeout = 30, max_bytes = 16 * 1024^2, metadata = list() )hm_worker_request( handle, operation = "handshake", array = NULL, channels = NULL, timeout = 30, max_bytes = 16 * 1024^2, metadata = list() )
handle |
Managed process handle. |
operation |
One of handshake, predict, extract, fit or cancel. |
array |
Numeric array; dimensions and channel metadata are explicit. |
channels |
Expected measured channel identifiers. |
timeout |
Maximum seconds. |
max_bytes |
Maximum request or response bytes. |
metadata |
Additional JSON metadata. |
Decoded worker response list; any array payload is reconstructed as a finite numeric R array in declared dimensions. Cancellation returns backend status invisibly.
Assemble a modelling workflow
hm_workflow(task, recipe, model)hm_workflow(task, recipe, model)
task |
An |
recipe |
An unfitted |
model |
An |
Assembly validates compatible declarations; fitting and backend admission occur separately.
An hm_workflow list containing the three declarations.
Validated spectral data container
sourcesNative arrays or declarative RDS locators, never live handles.
observationsIdentity and observation metadata.
bandsNative band mapping; wavelengths are in nm.
geometryExplicit spatial transform; empty for native spectra.
provenanceSource, radiometry and calibration declarations.
data_kindOne of spectra, image or sequence.
assetsDistinct asset-role metadata.
Validated time-indexed spectral sequence
frame_indexExplicit frame identity and elapsed seconds; gaps are retained.
Summarize fitted coefficients in a standard table
## S3 method for class 'hm_fit' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)## S3 method for class 'hm_fit' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
x |
An |
conf.int |
Include conditional confidence or posterior intervals. |
conf.level |
Interval level strictly between zero and one. |
... |
Additional arguments; currently unused. |
Frequentist uncertainty is implemented for LM and GLM. Other
coefficient engines retain unavailable uncertainty as NA. Intervals do not
include model selection, preprocessing selection or biological transport
uncertainty. Use coef(x, scale = "original") for an admitted affine map.
A data frame with term, estimate, std.error, statistic,
p.value, and optional conf.low and conf.high. Estimates use the
fitted
recipe coordinates. Bayesian rows are explicitly posterior summaries.